libcryptosec
Public Member Functions | List of all members

#include <DSAPrivateKey.h>

Inheritance diagram for DSAPrivateKey:
PrivateKey AsymmetricKey

Public Member Functions

 DSAPrivateKey (EVP_PKEY *key) throw (AsymmetricKeyException)
 
 DSAPrivateKey (ByteArray &derEncoded) throw (EncodeException, AsymmetricKeyException)
 
 DSAPrivateKey (std::string &pemEncoded) throw (EncodeException, AsymmetricKeyException)
 
 DSAPrivateKey (std::string &pemEncoded, ByteArray &passphrase) throw (EncodeException, AsymmetricKeyException)
 
virtual ~DSAPrivateKey ()
 
- Public Member Functions inherited from PrivateKey
 PrivateKey (EVP_PKEY *key) throw (AsymmetricKeyException)
 
 PrivateKey (ByteArray &derEncoded) throw (EncodeException)
 
 PrivateKey (std::string &pemEncoded) throw (EncodeException)
 
 PrivateKey (std::string &pemEncoded, ByteArray &passphrase) throw (EncodeException)
 
virtual ~PrivateKey ()
 
std::string getPemEncoded () throw (EncodeException)
 
std::string getPemEncoded (SymmetricKey &passphrase, SymmetricCipher::OperationMode mode) throw (SymmetricCipherException, EncodeException)
 
ByteArray getDerEncoded () throw (EncodeException)
 
bool operator== (PrivateKey &priv) throw ()
 
- Public Member Functions inherited from AsymmetricKey
 AsymmetricKey (EVP_PKEY *key) throw (AsymmetricKeyException)
 
 AsymmetricKey (ByteArray &encoded)
 
 AsymmetricKey (std::string &encoded)
 
virtual ~AsymmetricKey ()
 
AsymmetricKey::Algorithm getAlgorithm () throw (AsymmetricKeyException)
 
int getSize () throw (AsymmetricKeyException)
 
int getSizeBits () throw (AsymmetricKeyException)
 
EVP_PKEY * getEvpPkey ()
 

Additional Inherited Members

- Public Types inherited from AsymmetricKey
enum  Algorithm { RSA, DSA, ECDSA }
 
enum  Curve {
  X962_PRIME192V1 = 409, X962_PRIME192V2 = 410, X962_PRIME192V3 = 411, X962_PRIME239V1 = 412,
  X962_PRIME239V2 = 413, X962_PRIME239V3 = 414, X962_PRIME256V1 = 415, X962_C2PNB163V1 = 684,
  X962_C2PNB163V2 = 685, X962_C2PNB163V3 = 686, X962_C2PNB176V1 = 687, X962_C2TNB191V1 = 688,
  X962_C2TNB191V2 = 689, X962_C2TNB191V3 = 690, X962_C2PNB208W1 = 693, X962_C2TNB239V1 = 694,
  X962_C2TNB239V2 = 695, X962_C2TNB239V3 = 696, X962_C2PNB272W1 = 699, X962_C2PNB304W1 = 700,
  X962_C2TNB359V1 = 701, X962_C2PNB368W1 = 702, X962_C2TNB431R1 = 703, SECG_SECP160K1 = 708,
  SECG_SECP160R1 = 709, SECG_SECP160R2 = 710, SECG_SECP192K1 = 711, SECG_SECP224K1 = 712,
  SECG_SECP256K1 = 714, SECG_SECT163R1 = 722, SECG_SECT193R1 = 724, SECG_SECT193R2 = 725,
  SECG_SECT239K1 = 728, NISTSECG_SECP224R1 = 713, NISTSECG_SECP384R1 = 715, NISTSECG_SECP521R1 = 716,
  NISTSECG_SECT163K1 = 721, NISTSECG_SECT163R2 = 723, NISTSECG_SECT233K1 = 726, NISTSECG_SECT233R1 = 727,
  NISTSECG_SECT283K1 = 729, NISTSECG_SECT283R1 = 730, NISTSECG_SECT409K1 = 731, NISTSECG_SECT409R1 = 732,
  NISTSECG_SECT571K1 = 733, NISTSECG_SECT571R1 = 734, BRAINPOOL_P160R1 = 921, BRAINPOOL_P160T1 = 922,
  BRAINPOOL_P192R1 = 923, BRAINPOOL_P192T1 = 924, BRAINPOOL_P224R1 = 925, BRAINPOOL_P224T1 = 926,
  BRAINPOOL_P256R1 = 927, BRAINPOOL_P256T1 = 928, BRAINPOOL_P320R1 = 929, BRAINPOOL_P320T1 = 930,
  BRAINPOOL_P384R1 = 931, BRAINPOOL_P384T1 = 932, BRAINPOOL_P512R1 = 933, BRAINPOOL_P512T1 = 934
}
 
- Static Protected Member Functions inherited from PrivateKey
static int passphraseCallBack (char *buf, int size, int rwflag, void *u)
 
- Protected Attributes inherited from AsymmetricKey
EVP_PKEY * key
 

Detailed Description

Representa uma chave privada DSA. Para a criação de chaves assimetricas a classe KeyPair deve ser consultada.

See also
KeyPair

Constructor & Destructor Documentation

◆ DSAPrivateKey() [1/4]

DSAPrivateKey::DSAPrivateKey ( EVP_PKEY *  key)
throw (AsymmetricKeyException
)

Construtor para uso interno recebendo um ponteiro para a estrutura OpenSSL EVP_PKEY.

Parameters
keyponteiro para a estrutura OpenSSL EVP_PKEY.
Exceptions
AsymmetricKeyExceptioncaso a estrutura EVP_PKEY não seja uma estrutura OpenSSL válida ou ocorra algum problema na sua carga.

◆ DSAPrivateKey() [2/4]

DSAPrivateKey::DSAPrivateKey ( ByteArray derEncoded)
throw (EncodeException,
AsymmetricKeyException
)

Construtor recebendo a representação da chave privada no formato DER.

Parameters
derEncodedchave privada codificada no formato DER.
Exceptions
EncodeExceptioncaso tenha ocorrido um erro com a decodificação do DER.
AsymmetricKeyExceptioncaso ocorra um erro na criação da chave.

◆ DSAPrivateKey() [3/4]

DSAPrivateKey::DSAPrivateKey ( std::string &  pemEncoded)
throw (EncodeException,
AsymmetricKeyException
)

Construtor recebendo a representação da chave privada no formato PEM.

Parameters
pemEncodedchave privada codificada no formato PEM.
Exceptions
EncodeExceptioncaso tenha ocorrido um erro com a decodificação do PEM.
AsymmetricKeyExceptioncaso ocorra um erro na criação da chave.

◆ DSAPrivateKey() [4/4]

DSAPrivateKey::DSAPrivateKey ( std::string &  pemEncoded,
ByteArray passphrase 
)
throw (EncodeException,
AsymmetricKeyException
)

Construtor recebendo a representação da chave privada no formato PEM protegida por uma senha.

Parameters
pemEncodedchave privada codificada no formato PEM protegida por uma senha.
passphrasesenha que permitirá a decodificação e abertura da chave.
Exceptions
EncodeExceptioncaso tenha ocorrido um erro com a decodificação do PEM.
AsymmetricKeyExceptioncaso ocorra um erro na criação da chave.

◆ ~DSAPrivateKey()

DSAPrivateKey::~DSAPrivateKey ( )
virtual

Destrutor padrão, limpa a estrutura interna EVP_PKEY


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