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

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

Issue 512023002: Refactor the interface for generating keys. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Run git-cl format Created 6 years, 2 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
« no previous file with comments | « content/child/webcrypto/webcrypto_impl.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 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 blink::WebCryptoAlgorithmId hash_id); 45 blink::WebCryptoAlgorithmId hash_id);
46 46
47 // Returns true if the set bits in b make up a subset of the set bits in a. 47 // Returns true if the set bits in b make up a subset of the set bits in a.
48 bool ContainsKeyUsages(blink::WebCryptoKeyUsageMask a, 48 bool ContainsKeyUsages(blink::WebCryptoKeyUsageMask a,
49 blink::WebCryptoKeyUsageMask b); 49 blink::WebCryptoKeyUsageMask b);
50 50
51 bool KeyUsageAllows(const blink::WebCryptoKey& key, 51 bool KeyUsageAllows(const blink::WebCryptoKey& key,
52 const blink::WebCryptoKeyUsage usage); 52 const blink::WebCryptoKeyUsage usage);
53 53
54 bool IsAlgorithmRsa(blink::WebCryptoAlgorithmId alg_id); 54 bool IsAlgorithmRsa(blink::WebCryptoAlgorithmId alg_id);
55 bool IsAlgorithmAsymmetric(blink::WebCryptoAlgorithmId alg_id);
56 55
57 Status GetAesGcmTagLengthInBits(const blink::WebCryptoAesGcmParams* params, 56 Status GetAesGcmTagLengthInBits(const blink::WebCryptoAesGcmParams* params,
58 unsigned int* tag_length_bits); 57 unsigned int* tag_length_bits);
59 58
60 Status GetAesKeyGenLengthInBits(const blink::WebCryptoAesKeyGenParams* params, 59 Status GetAesKeyGenLengthInBits(const blink::WebCryptoAesKeyGenParams* params,
61 unsigned int* keylen_bits); 60 unsigned int* keylen_bits);
62 61
63 Status GetHmacKeyGenLengthInBits(const blink::WebCryptoHmacKeyGenParams* params, 62 Status GetHmacKeyGenLengthInBits(const blink::WebCryptoHmacKeyGenParams* params,
64 unsigned int* keylen_bits); 63 unsigned int* keylen_bits);
65 64
(...skipping 11 matching lines...) Expand all
77 Status GetRsaKeyGenParameters( 76 Status GetRsaKeyGenParameters(
78 const blink::WebCryptoRsaHashedKeyGenParams* params, 77 const blink::WebCryptoRsaHashedKeyGenParams* params,
79 unsigned int* public_exponent, 78 unsigned int* public_exponent,
80 unsigned int* modulus_length_bits); 79 unsigned int* modulus_length_bits);
81 80
82 } // namespace webcrypto 81 } // namespace webcrypto
83 82
84 } // namespace content 83 } // namespace content
85 84
86 #endif // CONTENT_CHILD_WEBCRYPTO_WEBCRYPTO_UTIL_H_ 85 #endif // CONTENT_CHILD_WEBCRYPTO_WEBCRYPTO_UTIL_H_
OLDNEW
« no previous file with comments | « content/child/webcrypto/webcrypto_impl.cc ('k') | content/child/webcrypto/webcrypto_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698