mirror of
https://github.com/pocoproject/poco.git
synced 2025-11-01 21:13:10 +01:00
Fix RSAKey constructor documentation.
The two RSAKey constructors which take existing keys (one from a
stream, the other from a string) have incomplete and ambiguous
documentation.
This change improves the header documentation to reflect that:
1. Decryption is supported using a private key (existing doc says you
can "only" sign if a private key is present),
2. Clarify that public key not needed when private key is present.
This commit is contained in:
@@ -64,13 +64,21 @@ public:
|
||||
|
||||
RSAKey(const std::string& publicKeyFile, const std::string& privateKeyFile = "", const std::string& privateKeyPassphrase = "");
|
||||
/// Creates the RSAKey, by reading public and private key from the given files and
|
||||
/// using the given passphrase for the private key. Can only by used for signing if
|
||||
/// a private key is available.
|
||||
/// using the given passphrase for the private key.
|
||||
///
|
||||
/// Cannot be used for signing or decryption unless a private key is available.
|
||||
///
|
||||
/// If a private key is specified, you don't need to specify a public key file.
|
||||
/// OpenSSL will auto-create the public key from the private key.
|
||||
|
||||
RSAKey(std::istream* pPublicKeyStream, std::istream* pPrivateKeyStream = 0, const std::string& privateKeyPassphrase = "");
|
||||
/// Creates the RSAKey. Can only by used for signing if pPrivKey
|
||||
/// is not null. If a private key file is specified, you don't need to
|
||||
/// specify a public key file. OpenSSL will auto-create it from the private key.
|
||||
/// Creates the RSAKey, by reading public and private key from the given streams and
|
||||
/// using the given passphrase for the private key.
|
||||
///
|
||||
/// Cannot be used for signing or decryption unless a private key is available.
|
||||
///
|
||||
/// If a private key is specified, you don't need to specify a public key file.
|
||||
/// OpenSSL will auto-create the public key from the private key.
|
||||
|
||||
~RSAKey();
|
||||
/// Destroys the RSAKey.
|
||||
|
||||
Reference in New Issue
Block a user