13 #include "mbedtls/rsa.h"
35 bool Generate(
unsigned a_KeySizeBits = 1024);
std::basic_string_view< std::byte > ContiguousByteBufferView
std::basic_string< std::byte > ContiguousByteBuffer
std::shared_ptr< cRsaPrivateKey > cRsaPrivateKeyPtr
Encapsulates an RSA private key used in PKI cryptography.
cRsaPrivateKey(void)
Creates a new empty object, the key is not assigned.
mbedtls_rsa_context * GetInternal(void)
Returns the internal context ptr.
mbedtls_rsa_context m_Rsa
The mbedTLS key context.
cCtrDrbgContext m_CtrDrbg
The random generator used for generating the key and encryption / decryption.
int Decrypt(ContiguousByteBufferView a_EncryptedData, Byte *a_DecryptedData, size_t a_DecryptedMaxLength)
Decrypts the data using RSAES-PKCS#1 algorithm.
ContiguousByteBuffer GetPubKeyDER(void)
Returns the public key part encoded in ASN1 DER encoding.
bool Generate(unsigned a_KeySizeBits=1024)
Generates a new key within this object, with the specified size in bits.