|
10Duke Enterprise C++ SDK
|
#include <PublicKeyFactory.h>
Creates cryptographical public keys.
Public Member Functions | |
| virtual std::unique_ptr< tenduke::crypto::PublicKey > | publicKeyFromPEM (const char *publicKeyAsPEM) const =0 |
| Creates a tenduke::crypto::PublicKey from PEM. | |
| virtual std::unique_ptr< tenduke::crypto::PublicKey > | publicKeyFromPEM (const std::string &publicKeyAsPEM) const =0 |
| Creates a tenduke::crypto::PublicKey from PEM. | |
| virtual std::unique_ptr< tenduke::crypto::PublicKey > | publicRSAKeyFromModuloAndExponent (const tenduke::utl::BinaryData &modulo, const tenduke::utl::BinaryData &exponent) const =0 |
| Creates a RSA tenduke::crypto::PublicKey from modulo and exponent. | |
|
pure virtual |
Creates a tenduke::crypto::PublicKey from PEM.
| publicKeyAsPEM | public key as PEM. Null-terminated string. |
Implemented in LibcryptoKeyFactory, tenduke::crypto::libcrypto::LibcryptoKeyFactory, tenduke::crypto::win::cng::WinCNGKeyFactory, and WinCNGKeyFactory.
|
pure virtual |
Creates a tenduke::crypto::PublicKey from PEM.
| publicKeyAsPEM | public key as PEM. |
Implemented in LibcryptoKeyFactory, tenduke::crypto::libcrypto::LibcryptoKeyFactory, tenduke::crypto::win::cng::WinCNGKeyFactory, and WinCNGKeyFactory.
|
pure virtual |
Creates a RSA tenduke::crypto::PublicKey from modulo and exponent.
The parameters are checked with tenduke::crypto::checkRSAPublicKeyParameters(): the modulus must be 2048 to 16384 bits, and the exponent odd, at least 3 and smaller than the modulus.
| modulo | modulus (n) as big-endian unsigned integer |
| exponent | public exponent (e) as big-endian unsigned integer |
| tenduke::crypto::CryptoException | if the parameters are not acceptable or the key cannot be created |
Implemented in LibcryptoKeyFactory, tenduke::crypto::libcrypto::LibcryptoKeyFactory, tenduke::crypto::win::cng::WinCNGKeyFactory, and WinCNGKeyFactory.