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_RENDERER_WEBCRYPTO_PLATFORM_CRYPTO_H_ | 5 #ifndef CONTENT_RENDERER_WEBCRYPTO_PLATFORM_CRYPTO_H_ |
6 #define CONTENT_RENDERER_WEBCRYPTO_PLATFORM_CRYPTO_H_ | 6 #define CONTENT_RENDERER_WEBCRYPTO_PLATFORM_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 "third_party/WebKit/public/platform/WebArrayBuffer.h" | 10 #include "third_party/WebKit/public/platform/WebArrayBuffer.h" |
11 #include "third_party/WebKit/public/platform/WebCrypto.h" | 11 #include "third_party/WebKit/public/platform/WebCrypto.h" |
12 #include "third_party/WebKit/public/platform/WebCryptoAlgorithmParams.h" | 12 #include "third_party/WebKit/public/platform/WebCryptoAlgorithmParams.h" |
13 | 13 |
14 namespace content { | 14 namespace content { |
15 | 15 |
16 enum EncryptOrDecrypt { | 16 enum EncryptOrDecrypt { ENCRYPT, DECRYPT }; |
17 ENCRYPT, | |
18 DECRYPT | |
19 }; | |
20 | 17 |
21 namespace webcrypto { | 18 namespace webcrypto { |
22 | 19 |
23 class CryptoData; | 20 class CryptoData; |
24 class Status; | 21 class Status; |
25 | 22 |
26 // Functions in the webcrypto::platform namespace are intended to be those | 23 // Functions in the webcrypto::platform namespace are intended to be those |
27 // which are OpenSSL/NSS specific. | 24 // which are OpenSSL/NSS specific. |
28 // | 25 // |
29 // The general purpose code which applies to both OpenSSL and NSS | 26 // The general purpose code which applies to both OpenSSL and NSS |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 // * |key| is non-null. | 168 // * |key| is non-null. |
172 Status ExportKeySpki(PublicKey* key, blink::WebArrayBuffer* buffer); | 169 Status ExportKeySpki(PublicKey* key, blink::WebArrayBuffer* buffer); |
173 | 170 |
174 } // namespace platform | 171 } // namespace platform |
175 | 172 |
176 } // namespace webcrypto | 173 } // namespace webcrypto |
177 | 174 |
178 } // namespace content | 175 } // namespace content |
179 | 176 |
180 #endif // CONTENT_RENDERER_WEBCRYPTO_PLATFORM_CRYPTO_H_ | 177 #endif // CONTENT_RENDERER_WEBCRYPTO_PLATFORM_CRYPTO_H_ |
OLD | NEW |