Add AES-ECB as a supported encryption mode in ECMG

This commit is contained in:
Lu Chen
2021-09-07 18:08:13 -07:00
parent b3a5fff77d
commit c387750897
11 changed files with 48 additions and 10 deletions

View File

@@ -363,6 +363,18 @@ bool RsaPublicKey::MatchesPublicKey(const RsaPublicKey& public_key) const {
uint32_t RsaPublicKey::KeySize() const { return RSA_size(key_); }
bool RsaPublicKey::SerializedKey(std::string* serialized_key) const {
if (serialized_key == nullptr) {
return false;
}
std::string tmp_serialized_key;
if (!rsa_util::SerializeRsaPublicKey(key(), &tmp_serialized_key)) {
return false;
}
*serialized_key = tmp_serialized_key;
return true;
}
RsaKeyFactory::RsaKeyFactory() {}
RsaKeyFactory::~RsaKeyFactory() {}