| 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 COMPONENTS_WEBCRYPTO_PLATFORM_CRYPTO_H_ | 5 #ifndef COMPONENTS_WEBCRYPTO_PLATFORM_CRYPTO_H_ |
| 6 #define COMPONENTS_WEBCRYPTO_PLATFORM_CRYPTO_H_ | 6 #define COMPONENTS_WEBCRYPTO_PLATFORM_CRYPTO_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "third_party/WebKit/public/platform/WebCrypto.h" | 12 #include "third_party/WebKit/public/platform/WebCrypto.h" |
| 13 | 13 |
| 14 // The definitions for these methods live in openssl/ | 14 // The definitions for these methods live in the algorithms/ directory. |
| 15 namespace webcrypto { | 15 namespace webcrypto { |
| 16 | 16 |
| 17 class AlgorithmImplementation; | 17 class AlgorithmImplementation; |
| 18 | 18 |
| 19 void PlatformInit(); | 19 void PlatformInit(); |
| 20 | 20 |
| 21 scoped_ptr<blink::WebCryptoDigestor> CreatePlatformDigestor( | 21 scoped_ptr<blink::WebCryptoDigestor> CreatePlatformDigestor( |
| 22 blink::WebCryptoAlgorithmId algorithm); | 22 blink::WebCryptoAlgorithmId algorithm); |
| 23 | 23 |
| 24 // TODO(eroman): Return scoped_ptr. |
| 25 // TODO(eroman): Stop calling this "platform" now that BoringSSL is the only |
| 26 // implementation. |
| 24 AlgorithmImplementation* CreatePlatformShaImplementation(); | 27 AlgorithmImplementation* CreatePlatformShaImplementation(); |
| 25 AlgorithmImplementation* CreatePlatformAesCbcImplementation(); | 28 AlgorithmImplementation* CreatePlatformAesCbcImplementation(); |
| 26 AlgorithmImplementation* CreatePlatformAesCtrImplementation(); | 29 AlgorithmImplementation* CreatePlatformAesCtrImplementation(); |
| 27 AlgorithmImplementation* CreatePlatformAesGcmImplementation(); | 30 AlgorithmImplementation* CreatePlatformAesGcmImplementation(); |
| 28 AlgorithmImplementation* CreatePlatformAesKwImplementation(); | 31 AlgorithmImplementation* CreatePlatformAesKwImplementation(); |
| 29 AlgorithmImplementation* CreatePlatformHmacImplementation(); | 32 AlgorithmImplementation* CreatePlatformHmacImplementation(); |
| 30 AlgorithmImplementation* CreatePlatformRsaOaepImplementation(); | 33 AlgorithmImplementation* CreatePlatformRsaOaepImplementation(); |
| 31 AlgorithmImplementation* CreatePlatformRsaSsaImplementation(); | 34 AlgorithmImplementation* CreatePlatformRsaSsaImplementation(); |
| 32 AlgorithmImplementation* CreatePlatformRsaPssImplementation(); | 35 AlgorithmImplementation* CreatePlatformRsaPssImplementation(); |
| 33 AlgorithmImplementation* CreatePlatformEcdsaImplementation(); | 36 AlgorithmImplementation* CreatePlatformEcdsaImplementation(); |
| 34 AlgorithmImplementation* CreatePlatformEcdhImplementation(); | 37 AlgorithmImplementation* CreatePlatformEcdhImplementation(); |
| 35 AlgorithmImplementation* CreatePlatformHkdfImplementation(); | 38 AlgorithmImplementation* CreatePlatformHkdfImplementation(); |
| 36 AlgorithmImplementation* CreatePlatformPbkdf2Implementation(); | 39 AlgorithmImplementation* CreatePlatformPbkdf2Implementation(); |
| 37 | 40 |
| 38 } // namespace webcrypto | 41 } // namespace webcrypto |
| 39 | 42 |
| 40 #endif // COMPONENTS_WEBCRYPTO_PLATFORM_CRYPTO_H_ | 43 #endif // COMPONENTS_WEBCRYPTO_PLATFORM_CRYPTO_H_ |
| OLD | NEW |