Index: content/child/webcrypto/shared_crypto.cc |
diff --git a/content/child/webcrypto/shared_crypto.cc b/content/child/webcrypto/shared_crypto.cc |
index 7d4704fc656ec7aca87fdefa3ffe22201bd70608..92fdc6f3d0c44ffa752c7a7f3c436b141157b07b 100644 |
--- a/content/child/webcrypto/shared_crypto.cc |
+++ b/content/child/webcrypto/shared_crypto.cc |
@@ -47,30 +47,6 @@ bool IsValidAesKeyLengthBytes(unsigned int length_bytes) { |
return length_bytes == 16 || length_bytes == 24 || length_bytes == 32; |
} |
-Status ToPlatformSymKey(const blink::WebCryptoKey& key, |
- platform::SymKey** out) { |
- *out = static_cast<platform::Key*>(key.handle())->AsSymKey(); |
- if (!*out) |
- return Status::ErrorUnexpectedKeyType(); |
- return Status::Success(); |
-} |
- |
-Status ToPlatformPublicKey(const blink::WebCryptoKey& key, |
- platform::PublicKey** out) { |
- *out = static_cast<platform::Key*>(key.handle())->AsPublicKey(); |
- if (!*out) |
- return Status::ErrorUnexpectedKeyType(); |
- return Status::Success(); |
-} |
- |
-Status ToPlatformPrivateKey(const blink::WebCryptoKey& key, |
- platform::PrivateKey** out) { |
- *out = static_cast<platform::Key*>(key.handle())->AsPrivateKey(); |
- if (!*out) |
- return Status::ErrorUnexpectedKeyType(); |
- return Status::Success(); |
-} |
- |
const size_t kAesBlockSizeBytes = 16; |
Status EncryptDecryptAesCbc(EncryptOrDecrypt mode, |
@@ -848,6 +824,30 @@ bool DeserializeKeyForClone(const blink::WebCryptoKeyAlgorithm& algorithm, |
return ValidateDeserializedKey(*key, algorithm, type); |
} |
+Status ToPlatformSymKey(const blink::WebCryptoKey& key, |
+ platform::SymKey** out) { |
+ *out = static_cast<platform::Key*>(key.handle())->AsSymKey(); |
+ if (!*out) |
+ return Status::ErrorUnexpectedKeyType(); |
+ return Status::Success(); |
+} |
+ |
+Status ToPlatformPublicKey(const blink::WebCryptoKey& key, |
+ platform::PublicKey** out) { |
+ *out = static_cast<platform::Key*>(key.handle())->AsPublicKey(); |
+ if (!*out) |
+ return Status::ErrorUnexpectedKeyType(); |
+ return Status::Success(); |
+} |
+ |
+Status ToPlatformPrivateKey(const blink::WebCryptoKey& key, |
+ platform::PrivateKey** out) { |
+ *out = static_cast<platform::Key*>(key.handle())->AsPrivateKey(); |
+ if (!*out) |
+ return Status::ErrorUnexpectedKeyType(); |
+ return Status::Success(); |
+} |
+ |
} // namespace webcrypto |
} // namespace content |