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

Side by Side Diff: crypto/ec_private_key.h

Issue 1453503002: [NOT FOR REVIEW] Ensure contributory behaviour for Web Push encryption. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@push-renames
Patch Set: Created 5 years, 1 month 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 | « components/gcm_driver/crypto/p256_key_util_openssl.cc ('k') | no next file » | 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 <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 bool ExportPublicKey(std::vector<uint8>* output); 88 bool ExportPublicKey(std::vector<uint8>* output);
89 89
90 // Exports the public key as an EC point in the uncompressed point format. 90 // Exports the public key as an EC point in the uncompressed point format.
91 bool ExportRawPublicKey(std::string* output); 91 bool ExportRawPublicKey(std::string* output);
92 92
93 // Exports private key data for testing. The format of data stored into output 93 // Exports private key data for testing. The format of data stored into output
94 // doesn't matter other than that it is consistent for the same key. 94 // doesn't matter other than that it is consistent for the same key.
95 bool ExportValue(std::vector<uint8>* output); 95 bool ExportValue(std::vector<uint8>* output);
96 bool ExportECParams(std::vector<uint8>* output); 96 bool ExportECParams(std::vector<uint8>* output);
97 97
98 private: 98 // private:
99 // Constructor is private. Use one of the Create*() methods above instead. 99 // Constructor is private. Use one of the Create*() methods above instead.
100 ECPrivateKey(); 100 ECPrivateKey();
101 101
102 #if defined(USE_OPENSSL) 102 #if defined(USE_OPENSSL)
103 EVP_PKEY* key_; 103 EVP_PKEY* key_;
104 #else 104 #else
105 SECKEYPrivateKey* key_; 105 SECKEYPrivateKey* key_;
106 SECKEYPublicKey* public_key_; 106 SECKEYPublicKey* public_key_;
107 #endif 107 #endif
108 108
109 DISALLOW_COPY_AND_ASSIGN(ECPrivateKey); 109 DISALLOW_COPY_AND_ASSIGN(ECPrivateKey);
110 }; 110 };
111 111
112 112
113 } // namespace crypto 113 } // namespace crypto
114 114
115 #endif // CRYPTO_EC_PRIVATE_KEY_H_ 115 #endif // CRYPTO_EC_PRIVATE_KEY_H_
OLDNEW
« no previous file with comments | « components/gcm_driver/crypto/p256_key_util_openssl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698