37 #ifndef VIRGIL_CRYPTO_TINY_CIPHER_H 38 #define VIRGIL_CRYPTO_TINY_CIPHER_H 43 #include "VirgilByteArray.h" 45 namespace virgil {
namespace crypto {
50 class VirgilTinyCipherImpl;
278 std::unique_ptr<Impl> impl_;
283 #endif // VIRGIL_CRYPTO_TINY_CIPHER_H Min.
Definition: VirgilTinyCipher.h:126
PackageSize
Constants that represents maximum number of bytes in one package.
Definition: VirgilTinyCipher.h:125
VirgilByteArray getPackage(size_t index) const
Return specific package.
void encrypt(const VirgilByteArray &data, const VirgilByteArray &recipientPublicKey)
Encrypt data with given public key.
VirgilByteArray verifyAndDecrypt(const VirgilByteArray &senderPublicKey, const VirgilByteArray &recipientPrivateKey, const VirgilByteArray &recipientPrivateKeyPassword=VirgilByteArray())
Verify accumulated packages and then decrypt it.
VirgilTinyCipher(size_t packageSize=PackageSize_Short_SMS)
Init cipher with given maximum package size.
Definition: VirgilHash.h:265
void addPackage(const VirgilByteArray &package)
Add package.
VirgilByteArray decrypt(const VirgilByteArray &recipientPrivateKey, const VirgilByteArray &recipientPrivateKeyPassword=VirgilByteArray())
Decrypt accumulated packages.
Root namespace for all Virgil Security libraries.
Definition: VirgilAsn1Compatible.h:46
std::vector< unsigned char > VirgilByteArray
This type represents a sequence of bytes.
Definition: VirgilByteArray.h:50
Long SMS.
Definition: VirgilTinyCipher.h:128
Short SMS.
Definition: VirgilTinyCipher.h:127
void reset()
Prepare cipher for the next encryption.
This class aim is to minimize encryption output.
Definition: VirgilTinyCipher.h:119
bool isPackagesAccumulated() const
Define whether all packages was accumulated or not.
void encryptAndSign(const VirgilByteArray &data, const VirgilByteArray &recipientPublicKey, const VirgilByteArray &senderPrivateKey, const VirgilByteArray &senderPrivateKeyPassword=VirgilByteArray())
Encrypt data with given public key and sign package.
size_t getPackageCount() const
Return total package count.