Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(134)

Side by Side Diff: crypto/ec_private_key.h

Issue 1739403002: Cut down on usage of deprecated APIs in //crypto. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: grumble grumble string vector char uint8_t grumble Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « crypto/crypto.gypi ('k') | crypto/ec_private_key_nss.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 std::vector<uint8_t>* output); 88 std::vector<uint8_t>* output);
89 89
90 // Exports the public key to an X.509 SubjectPublicKeyInfo block. 90 // Exports the public key to an X.509 SubjectPublicKeyInfo block.
91 bool ExportPublicKey(std::vector<uint8_t>* output); 91 bool ExportPublicKey(std::vector<uint8_t>* output);
92 92
93 // Exports the public key as an EC point in the uncompressed point format. 93 // Exports the public key as an EC point in the uncompressed point format.
94 bool ExportRawPublicKey(std::string* output); 94 bool ExportRawPublicKey(std::string* output);
95 95
96 // Exports private key data for testing. The format of data stored into output 96 // Exports private key data for testing. The format of data stored into output
97 // doesn't matter other than that it is consistent for the same key. 97 // doesn't matter other than that it is consistent for the same key.
98 bool ExportValue(std::vector<uint8_t>* output); 98 bool ExportValueForTesting(std::vector<uint8_t>* output);
99 bool ExportECParams(std::vector<uint8_t>* output);
100 99
101 private: 100 private:
102 // Constructor is private. Use one of the Create*() methods above instead. 101 // Constructor is private. Use one of the Create*() methods above instead.
103 ECPrivateKey(); 102 ECPrivateKey();
104 103
105 #if defined(USE_OPENSSL) 104 #if defined(USE_OPENSSL)
106 EVP_PKEY* key_; 105 EVP_PKEY* key_;
107 #else 106 #else
108 SECKEYPrivateKey* key_; 107 SECKEYPrivateKey* key_;
109 SECKEYPublicKey* public_key_; 108 SECKEYPublicKey* public_key_;
110 #endif 109 #endif
111 110
112 DISALLOW_COPY_AND_ASSIGN(ECPrivateKey); 111 DISALLOW_COPY_AND_ASSIGN(ECPrivateKey);
113 }; 112 };
114 113
115 114
116 } // namespace crypto 115 } // namespace crypto
117 116
118 #endif // CRYPTO_EC_PRIVATE_KEY_H_ 117 #endif // CRYPTO_EC_PRIVATE_KEY_H_
OLDNEW
« no previous file with comments | « crypto/crypto.gypi ('k') | crypto/ec_private_key_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698