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

Unified Diff: content/child/webcrypto/webcrypto_util.h

Issue 401233004: Refactor RSA key generation for WebCrypto's NSS implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix bad merge Created 6 years, 5 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
« no previous file with comments | « content/child/webcrypto/status.cc ('k') | content/child/webcrypto/webcrypto_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/webcrypto/webcrypto_util.h
diff --git a/content/child/webcrypto/webcrypto_util.h b/content/child/webcrypto/webcrypto_util.h
index 2438c90222e77f96a58688bba7ec4828c6d9c2f7..1e6778c2fec5ce452d66db51dee51c886b643e30 100644
--- a/content/child/webcrypto/webcrypto_util.h
+++ b/content/child/webcrypto/webcrypto_util.h
@@ -87,6 +87,17 @@ Status VerifyAesKeyLengthForImport(unsigned int keylen_bytes);
Status CheckKeyCreationUsages(blink::WebCryptoKeyUsageMask all_possible_usages,
blink::WebCryptoKeyUsageMask actual_usages);
+// Extracts the public exponent and modulus length from the Blink parameters.
+// On success it is guaranteed that:
+// * public_exponent is either 3 or 65537
+// * modulus_length_bits is a multiple of 8
+// * modulus_length is >= 256
+// * modulus_length is <= 16K
+Status GetRsaKeyGenParameters(
+ const blink::WebCryptoRsaHashedKeyGenParams* params,
+ unsigned int* public_exponent,
+ unsigned int* modulus_length_bits);
+
} // namespace webcrypto
} // namespace content
« no previous file with comments | « content/child/webcrypto/status.cc ('k') | content/child/webcrypto/webcrypto_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698