| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CRYPTO_EC_PRIVATE_KEY_H_ | 5 #ifndef CRYPTO_EC_PRIVATE_KEY_H_ |
| 6 #define CRYPTO_EC_PRIVATE_KEY_H_ | 6 #define CRYPTO_EC_PRIVATE_KEY_H_ |
| 7 | 7 |
| 8 #include <openssl/base.h> | |
| 9 #include <stddef.h> | 8 #include <stddef.h> |
| 10 #include <stdint.h> | 9 #include <stdint.h> |
| 11 | 10 |
| 12 #include <memory> | 11 #include <memory> |
| 13 #include <string> | 12 #include <string> |
| 14 #include <vector> | 13 #include <vector> |
| 15 | 14 |
| 16 #include "base/macros.h" | 15 #include "base/macros.h" |
| 17 #include "build/build_config.h" | 16 #include "build/build_config.h" |
| 18 #include "crypto/crypto_export.h" | 17 #include "crypto/crypto_export.h" |
| 18 #include "third_party/boringssl/src/include/openssl/base.h" |
| 19 | 19 |
| 20 namespace crypto { | 20 namespace crypto { |
| 21 | 21 |
| 22 // Encapsulates an elliptic curve (EC) private key. Can be used to generate new | 22 // Encapsulates an elliptic curve (EC) private key. Can be used to generate new |
| 23 // keys, export keys to other formats, or to extract a public key. | 23 // keys, export keys to other formats, or to extract a public key. |
| 24 // TODO(mattm): make this and RSAPrivateKey implement some PrivateKey interface. | 24 // TODO(mattm): make this and RSAPrivateKey implement some PrivateKey interface. |
| 25 // (The difference in types of key() and public_key() make this a little | 25 // (The difference in types of key() and public_key() make this a little |
| 26 // tricky.) | 26 // tricky.) |
| 27 class CRYPTO_EXPORT ECPrivateKey { | 27 class CRYPTO_EXPORT ECPrivateKey { |
| 28 public: | 28 public: |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 | 83 |
| 84 bssl::UniquePtr<EVP_PKEY> key_; | 84 bssl::UniquePtr<EVP_PKEY> key_; |
| 85 | 85 |
| 86 DISALLOW_COPY_AND_ASSIGN(ECPrivateKey); | 86 DISALLOW_COPY_AND_ASSIGN(ECPrivateKey); |
| 87 }; | 87 }; |
| 88 | 88 |
| 89 | 89 |
| 90 } // namespace crypto | 90 } // namespace crypto |
| 91 | 91 |
| 92 #endif // CRYPTO_EC_PRIVATE_KEY_H_ | 92 #endif // CRYPTO_EC_PRIVATE_KEY_H_ |
| OLD | NEW |