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

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

Issue 275943004: Add support for RSA-OAEP when using NSS 3.16.2 or later (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix ifdef 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 16 matching lines...) Expand all
27 CONTENT_EXPORT uint8* Uint8VectorStart(std::vector<uint8>* data); 27 CONTENT_EXPORT uint8* Uint8VectorStart(std::vector<uint8>* data);
28 28
29 // This function decodes unpadded 'base64url' encoded data, as described in 29 // This function decodes unpadded 'base64url' encoded data, as described in
30 // RFC4648 (http://www.ietf.org/rfc/rfc4648.txt) Section 5. 30 // RFC4648 (http://www.ietf.org/rfc/rfc4648.txt) Section 5.
31 // In Web Crypto, this type of encoding is only used inside JWK. 31 // In Web Crypto, this type of encoding is only used inside JWK.
32 CONTENT_EXPORT bool Base64DecodeUrlSafe(const std::string& input, 32 CONTENT_EXPORT bool Base64DecodeUrlSafe(const std::string& input,
33 std::string* output); 33 std::string* output);
34 34
35 // Returns an unpadded 'base64url' encoding of the input data, the opposite of 35 // Returns an unpadded 'base64url' encoding of the input data, the opposite of
36 // Base64DecodeUrlSafe() above. 36 // Base64DecodeUrlSafe() above.
37 std::string Base64EncodeUrlSafe(const base::StringPiece& input); 37 CONTENT_EXPORT std::string Base64EncodeUrlSafe(const base::StringPiece& input);
38 std::string Base64EncodeUrlSafe(const std::vector<uint8>& input); 38 CONTENT_EXPORT std::string Base64EncodeUrlSafe(const std::vector<uint8>& input);
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
(...skipping 20 matching lines...) Expand all
69 69
70 bool CreateSecretKeyAlgorithm(const blink::WebCryptoAlgorithm& algorithm, 70 bool CreateSecretKeyAlgorithm(const blink::WebCryptoAlgorithm& algorithm,
71 unsigned int keylen_bytes, 71 unsigned int keylen_bytes,
72 blink::WebCryptoKeyAlgorithm* key_algorithm); 72 blink::WebCryptoKeyAlgorithm* key_algorithm);
73 73
74 } // namespace webcrypto 74 } // namespace webcrypto
75 75
76 } // namespace content 76 } // namespace content
77 77
78 #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/test/data/webcrypto/rsa_oaep.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698