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

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

Issue 274863003: [refactor] Remove IsHashAlgorithm() function. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
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 <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 28 matching lines...) Expand all
39 39
40 // Composes a Web Crypto usage mask from an array of JWK key_ops values. 40 // Composes a Web Crypto usage mask from an array of JWK key_ops values.
41 CONTENT_EXPORT Status GetWebCryptoUsagesFromJwkKeyOps( 41 CONTENT_EXPORT Status GetWebCryptoUsagesFromJwkKeyOps(
42 const base::ListValue* jwk_key_ops_value, 42 const base::ListValue* jwk_key_ops_value,
43 blink::WebCryptoKeyUsageMask* jwk_key_ops_mask); 43 blink::WebCryptoKeyUsageMask* jwk_key_ops_mask);
44 44
45 // Composes a JWK key_ops array from a Web Crypto usage mask. 45 // Composes a JWK key_ops array from a Web Crypto usage mask.
46 base::ListValue* CreateJwkKeyOpsFromWebCryptoUsages( 46 base::ListValue* CreateJwkKeyOpsFromWebCryptoUsages(
47 blink::WebCryptoKeyUsageMask usage_mask); 47 blink::WebCryptoKeyUsageMask usage_mask);
48 48
49 CONTENT_EXPORT bool IsHashAlgorithm(blink::WebCryptoAlgorithmId alg_id);
50
51 // Returns the "hash" param for an algorithm if it exists, otherwise returns 49 // Returns the "hash" param for an algorithm if it exists, otherwise returns
52 // a null algorithm. 50 // a null algorithm.
53 blink::WebCryptoAlgorithm GetInnerHashAlgorithm( 51 blink::WebCryptoAlgorithm GetInnerHashAlgorithm(
54 const blink::WebCryptoAlgorithm& algorithm); 52 const blink::WebCryptoAlgorithm& algorithm);
55 53
56 // Creates a WebCryptoAlgorithm without any parameters. 54 // Creates a WebCryptoAlgorithm without any parameters.
57 CONTENT_EXPORT blink::WebCryptoAlgorithm CreateAlgorithm( 55 CONTENT_EXPORT blink::WebCryptoAlgorithm CreateAlgorithm(
58 blink::WebCryptoAlgorithmId id); 56 blink::WebCryptoAlgorithmId id);
59 57
60 // Creates an HMAC import algorithm whose inner hash algorithm is determined by 58 // Creates an HMAC import algorithm whose inner hash algorithm is determined by
(...skipping 10 matching lines...) Expand all
71 69
72 bool CreateSecretKeyAlgorithm(const blink::WebCryptoAlgorithm& algorithm, 70 bool CreateSecretKeyAlgorithm(const blink::WebCryptoAlgorithm& algorithm,
73 unsigned int keylen_bytes, 71 unsigned int keylen_bytes,
74 blink::WebCryptoKeyAlgorithm* key_algorithm); 72 blink::WebCryptoKeyAlgorithm* key_algorithm);
75 73
76 } // namespace webcrypto 74 } // namespace webcrypto
77 75
78 } // namespace content 76 } // namespace content
79 77
80 #endif // CONTENT_CHILD_WEBCRYPTO_WEBCRYPTO_UTIL_H_ 78 #endif // CONTENT_CHILD_WEBCRYPTO_WEBCRYPTO_UTIL_H_
OLDNEW
« no previous file with comments | « content/child/webcrypto/shared_crypto_unittest.cc ('k') | content/child/webcrypto/webcrypto_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698