libcryptosec
|
#include <SymmetricKey.h>
Public Types | |
enum | Algorithm { AES_128, AES_192, AES_256, DES, DES_EDE, DES_EDE3, RC2, RC4 } |
Public Member Functions | |
SymmetricKey (ByteArray &key, SymmetricKey::Algorithm algorithm) | |
SymmetricKey (const SymmetricKey &symmetricKey) | |
virtual | ~SymmetricKey () |
ByteArray | getEncoded () const |
SymmetricKey::Algorithm | getAlgorithm () const |
int | getSize () |
SymmetricKey & | operator= (const SymmetricKey &value) |
Static Public Member Functions | |
static std::string | getAlgorithmName (SymmetricKey::Algorithm algorithm) |
Representa chaves simétricas. Objetos dessa classe implementam funcionalidades de chaves simétricas usadas nos diferentes tipos de algorítmos de mesmo tipo.
Tipos de algoritmos simétricos suportados.
SymmetricKey::SymmetricKey | ( | ByteArray & | key, |
SymmetricKey::Algorithm | algorithm | ||
) |
Construtor recebendo a chave no seu formato binário e o seu tipo.
key | a chave no formato binário. |
algorithm | o algoritmo ao qual a chave se destina. |
SymmetricKey::SymmetricKey | ( | const SymmetricKey & | symmetricKey | ) |
Construtor de cópia.
symmetricKey | referência para a chave simétrica a ser copiada. |
|
virtual |
Destrutor padrão.
SymmetricKey::Algorithm SymmetricKey::getAlgorithm | ( | ) | const |
Retorna o algoritmo da chave.
|
static |
Retorna o nome do algoritmo simétrico na sua forma textual.
algorithm | o algoritmo cujo nome se deseja obter. |
ByteArray SymmetricKey::getEncoded | ( | ) | const |
Retorna a chave no formato binário.
int SymmetricKey::getSize | ( | ) |
Retorna co tamanho da chave.
SymmetricKey & SymmetricKey::operator= | ( | const SymmetricKey & | value | ) |
Operador de atribuição sobrescrito.
value | a chave a ser atribuída. |