Library: Crypto
Package: CryptoCore
Header: Poco/Crypto/RSAKeyImpl.h
class RSAKeyImpl
Direct Base Classes: Poco::RefCountedObject
All Base Classes: Poco::RefCountedObject
Member Functions: getRSA, save, size
Inherited Functions: duplicate, referenceCount, release
typedef Poco::AutoPtr < RSAKeyImpl > Ptr;
RSAKeyImpl(
const Poco::Net::X509Certificate & cert
);
Extracts the RSAKey from the certificate
RSAKeyImpl(
int keyLength,
unsigned long exponent
);
Creates the RSAKeyImpl.
RSAKeyImpl(
const std::string & publicKey,
const std::string & privateKeyFile,
const std::string & privateKeyPwd
);
Creates the RSAKeyImpl.
RSAKeyImpl(
std::istream * pPubKey,
std::istream * pPrivKey,
const std::string & privateKeyPwd
);
Creates the RSAKeyImpl. privKey is an optional parameter which can be null.
~RSAKeyImpl();
Destroys the RSAKeyImpl.
RSA * getRSA();
Returns the openssl rsa object
const RSA * getRSA() const;
Returns the openssl rsa object
void save(
const std::string & pubKeyFile,
const std::string & privKeyFile,
const std::string & privKeyPwd
);
Exports the keys to the given files. privKeyFile can be empty
void save(
std::ostream * pPubKey,
std::ostream * pPrivKey,
const std::string & privateKeyPwd
);
Exports the keys to the given streams. Can be empty
int size() const;
Returns the RSA_size