diff options
Diffstat (limited to 'content/child/webcrypto/nss/aes_key_nss.cc')
-rw-r--r-- | content/child/webcrypto/nss/aes_key_nss.cc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/content/child/webcrypto/nss/aes_key_nss.cc b/content/child/webcrypto/nss/aes_key_nss.cc index 2bd0c57..4472b41 100644 --- a/content/child/webcrypto/nss/aes_key_nss.cc +++ b/content/child/webcrypto/nss/aes_key_nss.cc @@ -129,6 +129,24 @@ Status AesAlgorithm::ExportKeyJwk(const blink::WebCryptoKey& key, return Status::Success(); } +Status AesAlgorithm::SerializeKeyForClone( + const blink::WebCryptoKey& key, + blink::WebVector<uint8_t>* key_data) const { + key_data->assign(SymKeyNss::Cast(key)->serialized_key_data()); + return Status::Success(); +} + +Status AesAlgorithm::DeserializeKeyForClone( + const blink::WebCryptoKeyAlgorithm& algorithm, + blink::WebCryptoKeyType type, + bool extractable, + blink::WebCryptoKeyUsageMask usages, + const CryptoData& key_data, + blink::WebCryptoKey* key) const { + return ImportKeyRaw(key_data, CreateAlgorithm(algorithm.id()), extractable, + usages, key); +} + } // namespace webcrypto } // namespace content |