Index: content/child/webcrypto/algorithm_dispatch.h |
diff --git a/content/child/webcrypto/algorithm_dispatch.h b/content/child/webcrypto/algorithm_dispatch.h |
index a6d22bca4f73d713d19f17fb3d372e8eca5efcf5..bed1b359959d09596dc0702e2497dceaa6a8abdb 100644 |
--- a/content/child/webcrypto/algorithm_dispatch.h |
+++ b/content/child/webcrypto/algorithm_dispatch.h |
@@ -42,18 +42,16 @@ CONTENT_EXPORT Status Digest(const blink::WebCryptoAlgorithm& algorithm, |
const CryptoData& data, |
std::vector<uint8_t>* buffer); |
-CONTENT_EXPORT Status |
- GenerateSecretKey(const blink::WebCryptoAlgorithm& algorithm, |
- bool extractable, |
- blink::WebCryptoKeyUsageMask usage_mask, |
- blink::WebCryptoKey* key); |
- |
-CONTENT_EXPORT Status |
- GenerateKeyPair(const blink::WebCryptoAlgorithm& algorithm, |
- bool extractable, |
- blink::WebCryptoKeyUsageMask usage_mask, |
- blink::WebCryptoKey* public_key, |
- blink::WebCryptoKey* private_key); |
+// GenerateKey() has two modes of operation: |
+// (1) If the algorithm is symmetric, a single secret key is generated and |
+// written into |*private_key|. |
+// (2) If the algorithm is asymmetric, a key pair is generated and written to |
+// |*public_key|, and |*private_key|. |
+CONTENT_EXPORT Status GenerateKey(const blink::WebCryptoAlgorithm& algorithm, |
+ bool extractable, |
+ blink::WebCryptoKeyUsageMask usage_mask, |
+ blink::WebCryptoKey* public_key, |
+ blink::WebCryptoKey* private_key); |
Ryan Sleevi
2014/08/28 00:35:33
From an API level, this feels wrong. I liked your
eroman
2014/08/28 14:34:19
Would you prefer:
(1) Keep the algorithm_dispatc
Ryan Sleevi
2014/08/28 21:15:04
To be clearer/explicit, I dislike the union of bot
|
CONTENT_EXPORT Status ImportKey(blink::WebCryptoKeyFormat format, |
const CryptoData& key_data, |