Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1448)

Unified Diff: Source/modules/crypto/NormalizeAlgorithm.cpp

Issue 111603004: [webcrypto] Add AES-KW to the list of registered algorithms. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/crypto/generateKey-expected.txt ('k') | public/platform/WebCryptoAlgorithm.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/crypto/NormalizeAlgorithm.cpp
diff --git a/Source/modules/crypto/NormalizeAlgorithm.cpp b/Source/modules/crypto/NormalizeAlgorithm.cpp
index f8faf1bf52010c9472a955055699de1694dd0bec..2d4d62c47ef458cfac37f53187b2da3b5ee01aab 100644
--- a/Source/modules/crypto/NormalizeAlgorithm.cpp
+++ b/Source/modules/crypto/NormalizeAlgorithm.cpp
@@ -77,6 +77,7 @@ const AlgorithmNameMapping algorithmNameMappings[] = {
{"SHA-256", blink::WebCryptoAlgorithmIdSha256},
{"SHA-384", blink::WebCryptoAlgorithmIdSha384},
{"SHA-512", blink::WebCryptoAlgorithmIdSha512},
+ {"AES-KW", blink::WebCryptoAlgorithmIdAesKw},
};
// What operations each algorithm supports, and what parameters it expects.
@@ -123,6 +124,12 @@ const OperationParamsMapping operationParamsMappings[] = {
{blink::WebCryptoAlgorithmIdSha256, Digest, blink::WebCryptoAlgorithmParamsTypeNone},
{blink::WebCryptoAlgorithmIdSha384, Digest, blink::WebCryptoAlgorithmParamsTypeNone},
{blink::WebCryptoAlgorithmIdSha512, Digest, blink::WebCryptoAlgorithmParamsTypeNone},
+
+ // AES-KW
+ {blink::WebCryptoAlgorithmIdAesKw, GenerateKey, blink::WebCryptoAlgorithmParamsTypeAesKeyGenParams},
+ {blink::WebCryptoAlgorithmIdAesKw, ImportKey, blink::WebCryptoAlgorithmParamsTypeNone},
+ {blink::WebCryptoAlgorithmIdAesKw, UnwrapKey, blink::WebCryptoAlgorithmParamsTypeNone},
+ {blink::WebCryptoAlgorithmIdAesKw, WrapKey, blink::WebCryptoAlgorithmParamsTypeNone},
};
// This structure describes an algorithm and its supported operations.
« no previous file with comments | « LayoutTests/crypto/generateKey-expected.txt ('k') | public/platform/WebCryptoAlgorithm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698