|
10Duke Enterprise C++ SDK
|
#include <LibcryptoKeyFactory.h>
Libcrypto implementation of tenduke::crypto::PublicKeyFactory.
Public Member Functions | |
| std::unique_ptr< tenduke::crypto::PublicKey > | publicKeyFromPEM (const char *publicKeyAsPEM) const override |
| Creates a tenduke::crypto::PublicKey from PEM. | |
| std::unique_ptr< tenduke::crypto::PublicKey > | publicKeyFromPEM (const std::string &publicKeyAsPEM) const override |
| Creates a tenduke::crypto::PublicKey from PEM. | |
| std::unique_ptr< tenduke::crypto::PublicKey > | publicRSAKeyFromModuloAndExponent (const tenduke::utl::BinaryData &modulo, const tenduke::utl::BinaryData &exponent) const override |
| Creates a RSA tenduke::crypto::PublicKey from modulo and exponent. | |
| virtual std::unique_ptr<::tenduke::crypto::PrivateKey > | privateKeyFromPEM (const std::string &privateKeyAsPEM) const |
| Creates private key from given PEM. | |
|
virtual |
Creates private key from given PEM.
| privateKeyAsPEM | - |
|
overridevirtual |
Creates a tenduke::crypto::PublicKey from PEM.
| publicKeyAsPEM | public key as PEM. Null-terminated string. |
Implements tenduke::crypto::PublicKeyFactory.
|
overridevirtual |
Creates a tenduke::crypto::PublicKey from PEM.
| publicKeyAsPEM | public key as PEM. |
Implements tenduke::crypto::PublicKeyFactory.
|
overridevirtual |
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 |
Implements tenduke::crypto::PublicKeyFactory.