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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/child/webcrypto/status.cc ('k') | content/child/webcrypto/webcrypto_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_CHILD_WEBCRYPTO_WEBCRYPTO_UTIL_H_ 5 #ifndef CONTENT_CHILD_WEBCRYPTO_WEBCRYPTO_UTIL_H_
6 #define CONTENT_CHILD_WEBCRYPTO_WEBCRYPTO_UTIL_H_ 6 #define CONTENT_CHILD_WEBCRYPTO_WEBCRYPTO_UTIL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 unsigned int* keylen_bits); 80 unsigned int* keylen_bits);
81 81
82 Status GetHmacKeyGenLengthInBits(const blink::WebCryptoHmacKeyGenParams* params, 82 Status GetHmacKeyGenLengthInBits(const blink::WebCryptoHmacKeyGenParams* params,
83 unsigned int* keylen_bits); 83 unsigned int* keylen_bits);
84 84
85 Status VerifyAesKeyLengthForImport(unsigned int keylen_bytes); 85 Status VerifyAesKeyLengthForImport(unsigned int keylen_bytes);
86 86
87 Status CheckKeyCreationUsages(blink::WebCryptoKeyUsageMask all_possible_usages, 87 Status CheckKeyCreationUsages(blink::WebCryptoKeyUsageMask all_possible_usages,
88 blink::WebCryptoKeyUsageMask actual_usages); 88 blink::WebCryptoKeyUsageMask actual_usages);
89 89
90 // Extracts the public exponent and modulus length from the Blink parameters.
91 // On success it is guaranteed that:
92 // * public_exponent is either 3 or 65537
93 // * modulus_length_bits is a multiple of 8
94 // * modulus_length is >= 256
95 // * modulus_length is <= 16K
96 Status GetRsaKeyGenParameters(
97 const blink::WebCryptoRsaHashedKeyGenParams* params,
98 unsigned int* public_exponent,
99 unsigned int* modulus_length_bits);
100
90 } // namespace webcrypto 101 } // namespace webcrypto
91 102
92 } // namespace content 103 } // namespace content
93 104
94 #endif // CONTENT_CHILD_WEBCRYPTO_WEBCRYPTO_UTIL_H_ 105 #endif // CONTENT_CHILD_WEBCRYPTO_WEBCRYPTO_UTIL_H_
OLDNEW
« 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