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

Side by Side Diff: crypto/rsa_private_key.h

Issue 1639553002: Fix RSAPrivateKey::ExportPrivateKey documentation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 | « no previous file | 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_RSA_PRIVATE_KEY_H_ 5 #ifndef CRYPTO_RSA_PRIVATE_KEY_H_
6 #define CRYPTO_RSA_PRIVATE_KEY_H_ 6 #define CRYPTO_RSA_PRIVATE_KEY_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 #if defined(USE_OPENSSL) 193 #if defined(USE_OPENSSL)
194 EVP_PKEY* key() { return key_; } 194 EVP_PKEY* key() { return key_; }
195 #else 195 #else
196 SECKEYPrivateKey* key() { return key_; } 196 SECKEYPrivateKey* key() { return key_; }
197 SECKEYPublicKey* public_key() { return public_key_; } 197 SECKEYPublicKey* public_key() { return public_key_; }
198 #endif 198 #endif
199 199
200 // Creates a copy of the object. 200 // Creates a copy of the object.
201 RSAPrivateKey* Copy() const; 201 RSAPrivateKey* Copy() const;
202 202
203 // Exports the private key to a PKCS #1 PrivateKey block. 203 // Exports the private key to a PKCS #8 PrivateKeyInfo block.
204 bool ExportPrivateKey(std::vector<uint8_t>* output) const; 204 bool ExportPrivateKey(std::vector<uint8_t>* output) const;
205 205
206 // Exports the public key to an X509 SubjectPublicKeyInfo block. 206 // Exports the public key to an X509 SubjectPublicKeyInfo block.
207 bool ExportPublicKey(std::vector<uint8_t>* output) const; 207 bool ExportPublicKey(std::vector<uint8_t>* output) const;
208 208
209 private: 209 private:
210 // Constructor is private. Use one of the Create*() methods above instead. 210 // Constructor is private. Use one of the Create*() methods above instead.
211 RSAPrivateKey(); 211 RSAPrivateKey();
212 212
213 #if defined(USE_OPENSSL) 213 #if defined(USE_OPENSSL)
214 EVP_PKEY* key_; 214 EVP_PKEY* key_;
215 #else 215 #else
216 SECKEYPrivateKey* key_; 216 SECKEYPrivateKey* key_;
217 SECKEYPublicKey* public_key_; 217 SECKEYPublicKey* public_key_;
218 #endif 218 #endif
219 219
220 DISALLOW_COPY_AND_ASSIGN(RSAPrivateKey); 220 DISALLOW_COPY_AND_ASSIGN(RSAPrivateKey);
221 }; 221 };
222 222
223 } // namespace crypto 223 } // namespace crypto
224 224
225 #endif // CRYPTO_RSA_PRIVATE_KEY_H_ 225 #endif // CRYPTO_RSA_PRIVATE_KEY_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698