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

Side by Side Diff: content/child/webcrypto/webcrypto_util.h

Issue 698363002: webcrypto: Add ECDSA algorithm (chromium-side) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@extract_more
Patch Set: sigh, more android pedantry Created 6 years, 1 month 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
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 10
(...skipping 26 matching lines...) Expand all
37 // algorithm that is not SHA*. 37 // algorithm that is not SHA*.
38 CONTENT_EXPORT blink::WebCryptoAlgorithm CreateHmacImportAlgorithm( 38 CONTENT_EXPORT blink::WebCryptoAlgorithm CreateHmacImportAlgorithm(
39 blink::WebCryptoAlgorithmId hash_id); 39 blink::WebCryptoAlgorithmId hash_id);
40 40
41 // Creates an import algorithm for RSA algorithms that take a hash. 41 // Creates an import algorithm for RSA algorithms that take a hash.
42 // It is an error to call this with a hash_id that is not a SHA*. 42 // It is an error to call this with a hash_id that is not a SHA*.
43 CONTENT_EXPORT blink::WebCryptoAlgorithm CreateRsaHashedImportAlgorithm( 43 CONTENT_EXPORT blink::WebCryptoAlgorithm CreateRsaHashedImportAlgorithm(
44 blink::WebCryptoAlgorithmId id, 44 blink::WebCryptoAlgorithmId id,
45 blink::WebCryptoAlgorithmId hash_id); 45 blink::WebCryptoAlgorithmId hash_id);
46 46
47 // Creates an import algorithm for EC keys.
48 CONTENT_EXPORT blink::WebCryptoAlgorithm CreateEcImportAlgorithm(
49 blink::WebCryptoAlgorithmId id,
50 blink::WebCryptoNamedCurve named_curve);
51
47 // Returns true if the set bits in b make up a subset of the set bits in a. 52 // Returns true if the set bits in b make up a subset of the set bits in a.
48 bool ContainsKeyUsages(blink::WebCryptoKeyUsageMask a, 53 bool ContainsKeyUsages(blink::WebCryptoKeyUsageMask a,
49 blink::WebCryptoKeyUsageMask b); 54 blink::WebCryptoKeyUsageMask b);
50 55
51 bool KeyUsageAllows(const blink::WebCryptoKey& key, 56 bool KeyUsageAllows(const blink::WebCryptoKey& key,
52 const blink::WebCryptoKeyUsage usage); 57 const blink::WebCryptoKeyUsage usage);
53 58
54 Status GetAesGcmTagLengthInBits(const blink::WebCryptoAesGcmParams* params, 59 Status GetAesGcmTagLengthInBits(const blink::WebCryptoAesGcmParams* params,
55 unsigned int* tag_length_bits); 60 unsigned int* tag_length_bits);
56 61
(...skipping 17 matching lines...) Expand all
74 Status GetRsaKeyGenParameters( 79 Status GetRsaKeyGenParameters(
75 const blink::WebCryptoRsaHashedKeyGenParams* params, 80 const blink::WebCryptoRsaHashedKeyGenParams* params,
76 unsigned int* public_exponent, 81 unsigned int* public_exponent,
77 unsigned int* modulus_length_bits); 82 unsigned int* modulus_length_bits);
78 83
79 } // namespace webcrypto 84 } // namespace webcrypto
80 85
81 } // namespace content 86 } // namespace content
82 87
83 #endif // CONTENT_CHILD_WEBCRYPTO_WEBCRYPTO_UTIL_H_ 88 #endif // CONTENT_CHILD_WEBCRYPTO_WEBCRYPTO_UTIL_H_
OLDNEW
« no previous file with comments | « content/child/webcrypto/test/ecdsa_unittest.cc ('k') | content/child/webcrypto/webcrypto_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698