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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 | 80 |
80 CONTENT_EXPORT Status Decrypt(const blink::WebCryptoAlgorithm& algorithm, | 81 CONTENT_EXPORT Status Decrypt(const blink::WebCryptoAlgorithm& algorithm, |
81 const blink::WebCryptoKey& key, | 82 const blink::WebCryptoKey& key, |
82 const CryptoData& data, | 83 const CryptoData& data, |
83 blink::WebArrayBuffer* buffer); | 84 blink::WebArrayBuffer* buffer); |
84 | 85 |
85 CONTENT_EXPORT Status Digest(const blink::WebCryptoAlgorithm& algorithm, | 86 CONTENT_EXPORT Status Digest(const blink::WebCryptoAlgorithm& algorithm, |
86 const CryptoData& data, | 87 const CryptoData& data, |
87 blink::WebArrayBuffer* buffer); | 88 blink::WebArrayBuffer* buffer); |
88 | 89 |
| 90 CONTENT_EXPORT scoped_ptr<blink::WebCryptoDigestor> CreateDigestor( |
| 91 blink::WebCryptoAlgorithmId algorithm); |
| 92 |
89 CONTENT_EXPORT Status | 93 CONTENT_EXPORT Status |
90 GenerateSecretKey(const blink::WebCryptoAlgorithm& algorithm, | 94 GenerateSecretKey(const blink::WebCryptoAlgorithm& algorithm, |
91 bool extractable, | 95 bool extractable, |
92 blink::WebCryptoKeyUsageMask usage_mask, | 96 blink::WebCryptoKeyUsageMask usage_mask, |
93 blink::WebCryptoKey* key); | 97 blink::WebCryptoKey* key); |
94 | 98 |
95 CONTENT_EXPORT Status | 99 CONTENT_EXPORT Status |
96 GenerateKeyPair(const blink::WebCryptoAlgorithm& algorithm, | 100 GenerateKeyPair(const blink::WebCryptoAlgorithm& algorithm, |
97 bool extractable, | 101 bool extractable, |
98 blink::WebCryptoKeyUsageMask usage_mask, | 102 blink::WebCryptoKeyUsageMask usage_mask, |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 bool extractable, | 153 bool extractable, |
150 blink::WebCryptoKeyUsageMask usage_mask, | 154 blink::WebCryptoKeyUsageMask usage_mask, |
151 const CryptoData& key_data, | 155 const CryptoData& key_data, |
152 blink::WebCryptoKey* key); | 156 blink::WebCryptoKey* key); |
153 | 157 |
154 } // namespace webcrypto | 158 } // namespace webcrypto |
155 | 159 |
156 } // namespace content | 160 } // namespace content |
157 | 161 |
158 #endif // CONTENT_CHILD_WEBCRYPTO_SHARED_CRYPTO_H_ | 162 #endif // CONTENT_CHILD_WEBCRYPTO_SHARED_CRYPTO_H_ |
OLD | NEW |