| 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_OPENSSL_UTIL_OPENSSL_H_ | 5 #ifndef CONTENT_CHILD_WEBCRYPTO_OPENSSL_UTIL_OPENSSL_H_ |
| 6 #define CONTENT_CHILD_WEBCRYPTO_OPENSSL_UTIL_OPENSSL_H_ | 6 #define CONTENT_CHILD_WEBCRYPTO_OPENSSL_UTIL_OPENSSL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include <openssl/ossl_typ.h> | 11 #include <openssl/ossl_typ.h> |
| 12 | 12 |
| 13 #include "crypto/scoped_openssl_types.h" | 13 #include "crypto/scoped_openssl_types.h" |
| 14 #include "third_party/WebKit/public/platform/WebCryptoAlgorithm.h" | 14 #include "third_party/WebKit/public/platform/WebCryptoAlgorithm.h" |
| 15 #include "third_party/WebKit/public/platform/WebCryptoKey.h" | 15 #include "third_party/WebKit/public/platform/WebCryptoKey.h" |
| 16 | 16 |
| 17 namespace content { | 17 namespace components { |
| 18 | 18 |
| 19 namespace webcrypto { | 19 namespace webcrypto { |
| 20 | 20 |
| 21 class CryptoData; | 21 class CryptoData; |
| 22 class GenerateKeyResult; | 22 class GenerateKeyResult; |
| 23 class Status; | 23 class Status; |
| 24 | 24 |
| 25 // The values of these constants correspond with the "enc" parameter of | 25 // The values of these constants correspond with the "enc" parameter of |
| 26 // EVP_CipherInit_ex(), do not change. | 26 // EVP_CipherInit_ex(), do not change. |
| 27 enum EncryptOrDecrypt { DECRYPT = 0, ENCRYPT = 1 }; | 27 enum EncryptOrDecrypt { DECRYPT = 0, ENCRYPT = 1 }; |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 crypto::ScopedEVP_PKEY* pkey); | 93 crypto::ScopedEVP_PKEY* pkey); |
| 94 | 94 |
| 95 // Allocates a new BIGNUM given a std::string big-endian representation. | 95 // Allocates a new BIGNUM given a std::string big-endian representation. |
| 96 BIGNUM* CreateBIGNUM(const std::string& n); | 96 BIGNUM* CreateBIGNUM(const std::string& n); |
| 97 | 97 |
| 98 // Converts a BIGNUM to a big endian byte array. | 98 // Converts a BIGNUM to a big endian byte array. |
| 99 std::vector<uint8_t> BIGNUMToVector(const BIGNUM* n); | 99 std::vector<uint8_t> BIGNUMToVector(const BIGNUM* n); |
| 100 | 100 |
| 101 } // namespace webcrypto | 101 } // namespace webcrypto |
| 102 | 102 |
| 103 } // namespace content | 103 } // namespace components |
| 104 | 104 |
| 105 #endif // CONTENT_CHILD_WEBCRYPTO_OPENSSL_UTIL_OPENSSL_H_ | 105 #endif // CONTENT_CHILD_WEBCRYPTO_OPENSSL_UTIL_OPENSSL_H_ |
| OLD | NEW |