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 "base/memory/scoped_ptr.h" |
10 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
11 #include "third_party/WebKit/public/platform/WebArrayBuffer.h" | 12 #include "third_party/WebKit/public/platform/WebArrayBuffer.h" |
12 #include "third_party/WebKit/public/platform/WebCrypto.h" | 13 #include "third_party/WebKit/public/platform/WebCrypto.h" |
13 #include "third_party/WebKit/public/platform/WebCryptoAlgorithmParams.h" | 14 #include "third_party/WebKit/public/platform/WebCryptoAlgorithmParams.h" |
14 | 15 |
15 namespace content { | 16 namespace content { |
16 | 17 |
17 namespace webcrypto { | 18 namespace webcrypto { |
18 | 19 |
19 class CryptoData; | 20 class CryptoData; |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 | 81 |
81 CONTENT_EXPORT Status Decrypt(const blink::WebCryptoAlgorithm& algorithm, | 82 CONTENT_EXPORT Status Decrypt(const blink::WebCryptoAlgorithm& algorithm, |
82 const blink::WebCryptoKey& key, | 83 const blink::WebCryptoKey& key, |
83 const CryptoData& data, | 84 const CryptoData& data, |
84 blink::WebArrayBuffer* buffer); | 85 blink::WebArrayBuffer* buffer); |
85 | 86 |
86 CONTENT_EXPORT Status Digest(const blink::WebCryptoAlgorithm& algorithm, | 87 CONTENT_EXPORT Status Digest(const blink::WebCryptoAlgorithm& algorithm, |
87 const CryptoData& data, | 88 const CryptoData& data, |
88 blink::WebArrayBuffer* buffer); | 89 blink::WebArrayBuffer* buffer); |
89 | 90 |
| 91 CONTENT_EXPORT scoped_ptr<blink::WebCryptoDigestor> CreateDigestor( |
| 92 blink::WebCryptoAlgorithmId algorithm); |
| 93 |
90 CONTENT_EXPORT Status | 94 CONTENT_EXPORT Status |
91 GenerateSecretKey(const blink::WebCryptoAlgorithm& algorithm, | 95 GenerateSecretKey(const blink::WebCryptoAlgorithm& algorithm, |
92 bool extractable, | 96 bool extractable, |
93 blink::WebCryptoKeyUsageMask usage_mask, | 97 blink::WebCryptoKeyUsageMask usage_mask, |
94 blink::WebCryptoKey* key); | 98 blink::WebCryptoKey* key); |
95 | 99 |
96 CONTENT_EXPORT Status | 100 CONTENT_EXPORT Status |
97 GenerateKeyPair(const blink::WebCryptoAlgorithm& algorithm, | 101 GenerateKeyPair(const blink::WebCryptoAlgorithm& algorithm, |
98 bool extractable, | 102 bool extractable, |
99 blink::WebCryptoKeyUsageMask usage_mask, | 103 blink::WebCryptoKeyUsageMask usage_mask, |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 bool extractable, | 163 bool extractable, |
160 blink::WebCryptoKeyUsageMask usage_mask, | 164 blink::WebCryptoKeyUsageMask usage_mask, |
161 const CryptoData& key_data, | 165 const CryptoData& key_data, |
162 blink::WebCryptoKey* key); | 166 blink::WebCryptoKey* key); |
163 | 167 |
164 } // namespace webcrypto | 168 } // namespace webcrypto |
165 | 169 |
166 } // namespace content | 170 } // namespace content |
167 | 171 |
168 #endif // CONTENT_CHILD_WEBCRYPTO_SHARED_CRYPTO_H_ | 172 #endif // CONTENT_CHILD_WEBCRYPTO_SHARED_CRYPTO_H_ |
OLD | NEW |