10 #ifndef PACKAGER_MEDIA_BASE_RSA_KEY_H_
11 #define PACKAGER_MEDIA_BASE_RSA_KEY_H_
15 #include <mbedtls/ctr_drbg.h>
16 #include <mbedtls/entropy.h>
17 #include <mbedtls/pk.h>
19 #include <packager/macros/classes.h>
36 bool Decrypt(
const std::string& encrypted_message,
37 std::string* decrypted_message);
47 bool Deserialize(
const std::string& serialized_key);
49 mbedtls_pk_context pk_context_;
50 mbedtls_entropy_context entropy_context_;
51 mbedtls_ctr_drbg_context prng_context_;
68 bool Encrypt(
const std::string& clear_message,
69 std::string* encrypted_message);
74 const std::string& signature);
79 bool Deserialize(
const std::string& serialized_key);
81 mbedtls_pk_context pk_context_;
82 mbedtls_entropy_context entropy_context_;
83 mbedtls_ctr_drbg_context prng_context_;
All the methods that are virtual are virtual for mocking.