libcryptosec
Public Member Functions | Protected Member Functions | List of all members

#include <ECDSAKeyPair.h>

Inheritance diagram for ECDSAKeyPair:
KeyPair

Public Member Functions

 ECDSAKeyPair (ByteArray &derEncoded) throw (AsymmetricKeyException)
 
 ECDSAKeyPair (std::string &encoded) throw (AsymmetricKeyException)
 
 ECDSAKeyPair (const EllipticCurve &curve) throw (AsymmetricKeyException)
 
 ECDSAKeyPair (AsymmetricKey::Curve curve, bool named=true) throw (AsymmetricKeyException)
 
virtual ~ECDSAKeyPair ()
 
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
 

Protected Member Functions

void generateKey (EC_GROUP *group) throw (AsymmetricKeyException)
 
EC_GROUP * createGroup (const EllipticCurve &curve)
 
EC_GROUP * createGroup (ByteArray &derEncoded)
 
- Protected Member Functions inherited from KeyPair
 KeyPair ()
 
std::string getPublicKeyPemEncoded () throw (EncodeException)
 

Additional Inherited Members

- 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 ECDSA. Essa classe deve ser usada para a criação de chaves assimétricas ECDSA que não possui nome ou NID definido no OpenSSL. Par de chaves é gerada através dos parâmetros da curva, enviados em ASN1 (PEM ou DER) ou pela classe EllipticCurve. É uma especialização da classe KeyPair

See also
EllipticCurve
BrainpoolCurveFactory

Constructor & Destructor Documentation

◆ ECDSAKeyPair() [1/4]

ECDSAKeyPair::ECDSAKeyPair ( ByteArray derEncoded)
throw (AsymmetricKeyException
)

Cria par por parâmetros informados em DER TODO

◆ ECDSAKeyPair() [2/4]

ECDSAKeyPair::ECDSAKeyPair ( std::string &  encoded)
throw (AsymmetricKeyException
)

Cria par por parâmetros informados em PEM TODO

◆ ECDSAKeyPair() [3/4]

ECDSAKeyPair::ECDSAKeyPair ( const EllipticCurve curve)
throw (AsymmetricKeyException
)

Cria par por parãmetros informados por um objeto Curve TODO

◆ ECDSAKeyPair() [4/4]

ECDSAKeyPair::ECDSAKeyPair ( AsymmetricKey::Curve  curve,
bool  named = true 
)
throw (AsymmetricKeyException
)

◆ ~ECDSAKeyPair()

ECDSAKeyPair::~ECDSAKeyPair ( )
virtual

Member Function Documentation

◆ createGroup() [1/2]

EC_GROUP * ECDSAKeyPair::createGroup ( const EllipticCurve curve)
protected

◆ createGroup() [2/2]

EC_GROUP * ECDSAKeyPair::createGroup ( ByteArray derEncoded)
protected

◆ generateKey()

void ECDSAKeyPair::generateKey ( EC_GROUP *  group)
throw (AsymmetricKeyException
)
protected

◆ getAlgorithm()

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

gets algorithm id from the key

Returns
algorithm id

Reimplemented from KeyPair.

◆ getPrivateKey()

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

gets the private from key pair

Returns
a private key from key pair

Reimplemented from KeyPair.

◆ getPublicKey()

PublicKey * ECDSAKeyPair::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: