libcryptosec
Public Member Functions | List of all members

#include <RSAKeyPair.h>

Inheritance diagram for RSAKeyPair:
KeyPair

Public Member Functions

 RSAKeyPair (int length) throw (AsymmetricKeyException)
 
virtual ~RSAKeyPair ()
 
virtual PublicKeygetPublicKey () throw (AsymmetricKeyException, EncodeException)
 
virtual PrivateKeygetPrivateKey () throw (AsymmetricKeyException)
 
virtual AsymmetricKey::Algorithm getAlgorithm () throw (AsymmetricKeyException)
 
- Public Member Functions inherited from KeyPair
 KeyPair (AsymmetricKey::Algorithm algorithm, int length) throw (AsymmetricKeyException)
 
 KeyPair (Engine *engine, std::string keyId) throw (EngineException)
 
 KeyPair (std::string pemEncoded, ByteArray passphrase) throw (EncodeException)
 
 KeyPair (std::string pemEncoded) throw (EncodeException)
 
 KeyPair (ByteArray derEncoded) throw (EncodeException)
 
 KeyPair (const KeyPair &keyPair)
 
virtual ~KeyPair ()
 
std::string getPemEncoded (SymmetricKey &passphrase, SymmetricCipher::OperationMode mode) throw (SymmetricCipherException, EncodeException)
 
std::string getPemEncoded () throw (EncodeException)
 
ByteArray getDerEncoded () throw (EncodeException)
 
int getSize () throw (AsymmetricKeyException)
 
int getSizeBits () throw (AsymmetricKeyException)
 
EVP_PKEY * getEvpPkey () const
 
ENGINE * getEngine () const
 
std::string getKeyId () const
 

Additional Inherited Members

- Protected Member Functions inherited from KeyPair
 KeyPair ()
 
std::string getPublicKeyPemEncoded () throw (EncodeException)
 
- Static Protected Member Functions inherited from KeyPair
static int passphraseCallBack (char *buf, int size, int rwflag, void *u)
 
- Protected Attributes inherited from KeyPair
EVP_PKEY * key
 
std::string keyId
 
ENGINE * engine
 

Detailed Description

Representa um par de chaves assimétricas RSA. Essa classe deve ser usada para a criação de chaves assimétricas RSA É uma especialização da classe KeyPair

Constructor & Destructor Documentation

◆ RSAKeyPair()

RSAKeyPair::RSAKeyPair ( int  length)
throw (AsymmetricKeyException
)

create a RSAKeyPair object, creating a new key pair

Parameters
lengthkey lenght
Exceptions
AsymmetricKeyExceptionif the key cannot be created

◆ ~RSAKeyPair()

RSAKeyPair::~RSAKeyPair ( )
virtual

Member Function Documentation

◆ getAlgorithm()

AsymmetricKey::Algorithm RSAKeyPair::getAlgorithm ( )
throw (AsymmetricKeyException
)
virtual

encode the key pair in PEM format encrypted

Parameters
passphrasekey for encrypt the key pair
modecipher operation mode
Returns
key pair encrypted encoded in PEM format

Reimplemented from KeyPair.

◆ getPrivateKey()

PrivateKey * RSAKeyPair::getPrivateKey ( )
throw (AsymmetricKeyException
)
virtual

gets the private from key pair

Returns
a private key from key pair

Reimplemented from KeyPair.

◆ getPublicKey()

PublicKey * RSAKeyPair::getPublicKey ( )
throw (AsymmetricKeyException,
EncodeException
)
virtual

gets the public key from key pair

Returns
a public key from key pair

Reimplemented from KeyPair.


The documentation for this class was generated from the following files: