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

Unified Diff: content/renderer/webcrypto/platform_crypto.h

Issue 178073007: [webcrypto] Update to use the KeyAlgorithm. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 months 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
Index: content/renderer/webcrypto/platform_crypto.h
diff --git a/content/renderer/webcrypto/platform_crypto.h b/content/renderer/webcrypto/platform_crypto.h
index 0dd575fd8cfc029e9bd7a4a453ec737605ca662d..2530be650ed84d4a9ad0e7f5feed29fdf42e0990 100644
--- a/content/renderer/webcrypto/platform_crypto.h
+++ b/content/renderer/webcrypto/platform_crypto.h
@@ -122,10 +122,18 @@ Status GenerateSecretKey(const blink::WebCryptoAlgorithm& algorithm,
// Preconditions:
// * algorithm.id() is for an RSA algorithm.
-// * algorithm.rsaKeyGenParams() is non-null.
+// * public_exponent, modulus_length_bits and hash_or_null are the same as what
+// is in algorithm. They are split out for convenience.
+// * hash_or_null.isNull() may be true if a hash is not applicable to the
+// algorithm
+// * modulus_length_bits is not 0
+// * public_exponent is not empty.
Status GenerateRsaKeyPair(const blink::WebCryptoAlgorithm& algorithm,
bool extractable,
blink::WebCryptoKeyUsageMask usage_mask,
+ unsigned int modulus_length_bits,
+ const CryptoData& public_exponent,
+ const blink::WebCryptoAlgorithm& hash,
blink::WebCryptoKey* public_key,
blink::WebCryptoKey* private_key);
@@ -150,7 +158,6 @@ Status ImportRsaPublicKey(const blink::WebCryptoAlgorithm& algorithm,
Status ImportKeySpki(const blink::WebCryptoAlgorithm& algorithm_or_null,
const CryptoData& key_data,
- bool extractable,
blink::WebCryptoKeyUsageMask usage_mask,
blink::WebCryptoKey* key);

Powered by Google App Engine
This is Rietveld 408576698