13 #include "mbedtls/pk.h"
39 int Decrypt(
const Byte * a_EncryptedData,
size_t a_EncryptedLength,
Byte * a_DecryptedData,
size_t a_DecryptedMaxLength);
44 int Encrypt(
const Byte * a_PlainData,
size_t a_PlainLength,
Byte * a_EncryptedData,
size_t a_EncryptedMaxLength);
49 int ParsePublic(
const void * a_Data,
size_t a_NumBytes);
std::shared_ptr< cCryptoKey > cCryptoKeyPtr
int ParsePrivate(const void *a_Data, size_t a_NumBytes, const AString &a_Password)
Parses the specified data into a private key representation.
mbedtls_pk_context * GetInternal(void)
Returns the internal context ptr.
mbedtls_pk_context m_Pk
The mbedTLS representation of the key data.
int Encrypt(const Byte *a_PlainData, size_t a_PlainLength, Byte *a_EncryptedData, size_t a_EncryptedMaxLength)
Encrypts the data using the stored public key Both a_EncryptedData and a_DecryptedData must be at lea...
int ParsePublic(const void *a_Data, size_t a_NumBytes)
Parses the specified data into a public key representation.
bool IsValid(void) const
Returns true if the contained key is valid.
cCryptoKey(void)
Constructs an empty key instance.
int Decrypt(const Byte *a_EncryptedData, size_t a_EncryptedLength, Byte *a_DecryptedData, size_t a_DecryptedMaxLength)
Decrypts the data using the stored public key Both a_EncryptedData and a_DecryptedData must be at lea...
cCtrDrbgContext m_CtrDrbg
The random generator used in encryption and decryption.