Chromium Code Reviews| Index: content/renderer/webcrypto/platform_crypto.h |
| diff --git a/content/renderer/webcrypto/platform_crypto.h b/content/renderer/webcrypto/platform_crypto.h |
| index 4b79fd875eaa26fcf139a91c16e5b834ff8f534f..7b0607307442dc177554ddf70d347ae32d4c0133 100644 |
| --- a/content/renderer/webcrypto/platform_crypto.h |
| +++ b/content/renderer/webcrypto/platform_crypto.h |
| @@ -176,6 +176,25 @@ Status ExportKeyRaw(SymKey* key, blink::WebArrayBuffer* buffer); |
| // * |key| is non-null. |
| Status ExportKeySpki(PublicKey* key, blink::WebArrayBuffer* buffer); |
| +// Preconditions: |
| +// * |wrapping_key| is non-null |
| +// * |key| is non-null |
| +Status WrapSymKeyAesKw(SymKey* wrapping_key, |
| + SymKey* key, |
| + blink::WebArrayBuffer* buffer); |
| + |
| +// Preconditions: |
| +// * |wrapping_key| is non-null |
| +// * |key| is non-null |
| +// * |algorithm.id()| is for a symmetric key algorithm. |
| +// * |wrapped_key_data| is at least 24 bytes and a multiple of 8 bytes |
|
eroman
2014/03/01 01:13:54
This is not currently guranteed as the checks are
padolph
2014/03/01 01:55:01
Done.
|
| +Status UnwrapSymKeyAesKw(const CryptoData& wrapped_key_data, |
| + SymKey* wrapping_key, |
| + const blink::WebCryptoAlgorithm& algorithm, |
| + bool extractable, |
| + blink::WebCryptoKeyUsageMask usage_mask, |
| + blink::WebCryptoKey* key); |
| + |
| } // namespace platform |
| } // namespace webcrypto |