OLD | NEW |
---|---|
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_SHARED_CRYPTO_H_ | 5 #ifndef CONTENT_CHILD_WEBCRYPTO_SHARED_CRYPTO_H_ |
6 #define CONTENT_CHILD_WEBCRYPTO_SHARED_CRYPTO_H_ | 6 #define CONTENT_CHILD_WEBCRYPTO_SHARED_CRYPTO_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
11 #include "third_party/WebKit/public/platform/WebArrayBuffer.h" | 11 #include "third_party/WebKit/public/platform/WebArrayBuffer.h" |
12 #include "third_party/WebKit/public/platform/WebCrypto.h" | 12 #include "third_party/WebKit/public/platform/WebCrypto.h" |
13 #include "third_party/WebKit/public/platform/WebCryptoAlgorithmParams.h" | 13 #include "third_party/WebKit/public/platform/WebCryptoAlgorithmParams.h" |
14 | 14 |
15 namespace content { | 15 namespace content { |
16 | 16 |
17 namespace webcrypto { | 17 namespace webcrypto { |
18 | 18 |
19 class CryptoData; | 19 class CryptoData; |
20 | |
eroman
2014/03/26 00:10:37
hah! you were just copy pasting my mistake :)
| |
21 class Status; | 20 class Status; |
22 | 21 |
23 // Do one-time initialization. It is safe to call this multiple times. | 22 // Do one-time initialization. It is safe to call this multiple times. |
24 CONTENT_EXPORT void Init(); | 23 CONTENT_EXPORT void Init(); |
25 | 24 |
26 // The functions exported by shared_crypto.h provide a common entry point for | 25 // The functions exported by shared_crypto.h provide a common entry point for |
27 // synchronous crypto operations. | 26 // synchronous crypto operations. |
28 // | 27 // |
29 // Here is how the layer cake looks. | 28 // Here is how the layer cake looks. |
30 // | 29 // |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
116 const CryptoData& data, | 115 const CryptoData& data, |
117 blink::WebArrayBuffer* buffer); | 116 blink::WebArrayBuffer* buffer); |
118 | 117 |
119 CONTENT_EXPORT Status | 118 CONTENT_EXPORT Status |
120 VerifySignature(const blink::WebCryptoAlgorithm& algorithm, | 119 VerifySignature(const blink::WebCryptoAlgorithm& algorithm, |
121 const blink::WebCryptoKey& key, | 120 const blink::WebCryptoKey& key, |
122 const CryptoData& signature, | 121 const CryptoData& signature, |
123 const CryptoData& data, | 122 const CryptoData& data, |
124 bool* signature_match); | 123 bool* signature_match); |
125 | 124 |
126 CONTENT_EXPORT Status ImportKeyJwk(const CryptoData& key_data, | |
127 const blink::WebCryptoAlgorithm& algorithm, | |
128 bool extractable, | |
129 blink::WebCryptoKeyUsageMask usage_mask, | |
130 blink::WebCryptoKey* key); | |
131 | |
132 CONTENT_EXPORT Status | |
133 ExportKeyJwk(const blink::WebCryptoKey& key, blink::WebArrayBuffer* buffer); | |
134 | |
135 CONTENT_EXPORT Status | 125 CONTENT_EXPORT Status |
136 WrapKey(blink::WebCryptoKeyFormat format, | 126 WrapKey(blink::WebCryptoKeyFormat format, |
137 const blink::WebCryptoKey& wrapping_key, | 127 const blink::WebCryptoKey& wrapping_key, |
138 const blink::WebCryptoKey& key_to_wrap, | 128 const blink::WebCryptoKey& key_to_wrap, |
139 const blink::WebCryptoAlgorithm& wrapping_algorithm, | 129 const blink::WebCryptoAlgorithm& wrapping_algorithm, |
140 blink::WebArrayBuffer* buffer); | 130 blink::WebArrayBuffer* buffer); |
141 | 131 |
142 CONTENT_EXPORT Status | 132 CONTENT_EXPORT Status |
143 UnwrapKey(blink::WebCryptoKeyFormat format, | 133 UnwrapKey(blink::WebCryptoKeyFormat format, |
144 const CryptoData& wrapped_key_data, | 134 const CryptoData& wrapped_key_data, |
(...skipping 14 matching lines...) Expand all Loading... | |
159 bool extractable, | 149 bool extractable, |
160 blink::WebCryptoKeyUsageMask usage_mask, | 150 blink::WebCryptoKeyUsageMask usage_mask, |
161 const CryptoData& key_data, | 151 const CryptoData& key_data, |
162 blink::WebCryptoKey* key); | 152 blink::WebCryptoKey* key); |
163 | 153 |
164 } // namespace webcrypto | 154 } // namespace webcrypto |
165 | 155 |
166 } // namespace content | 156 } // namespace content |
167 | 157 |
168 #endif // CONTENT_CHILD_WEBCRYPTO_SHARED_CRYPTO_H_ | 158 #endif // CONTENT_CHILD_WEBCRYPTO_SHARED_CRYPTO_H_ |
OLD | NEW |