|
SASC-NG
DVBSoftCAM
|
#include <crypto.h>
Inheritance diagram for cAES:Public Member Functions | |
| cAES (void) | |
| void | SetKey (const unsigned char *key) |
| bool | Decrypt (unsigned char *data, int len) const |
| bool | Decrypt (const unsigned char *data, int len, unsigned char *decrypt) const |
| int | Encrypt (const unsigned char *data, int len, unsigned char *crypt) const |
| bool cAES::Decrypt | ( | unsigned char * | data, |
| int | len | ||
| ) | const |
Definition at line 431 of file crypto.c.
References AES_decrypt(), and i.
Referenced by cSmartCardViaccess::Decode(), cCmd0cCrypt::Decrypt(), cCardClientCamd35::RecvBlock(), cCardClientCommon::RecvMsg(), and cTPSDecrypt::TpsDecrypt().
| bool cAES::Decrypt | ( | const unsigned char * | data, |
| int | len, | ||
| unsigned char * | decrypt | ||
| ) | const |
| int cAES::Encrypt | ( | const unsigned char * | data, |
| int | len, | ||
| unsigned char * | crypt | ||
| ) | const |
Definition at line 421 of file crypto.c.
References AES_encrypt(), and i.
Referenced by cCardClientCamd35::SendBlock(), and cCardClientCommon::SendMsg().
| void cAES::SetKey | ( | const unsigned char * | key | ) |
Definition at line 414 of file crypto.c.
References AES_set_decrypt_key(), and AES_set_encrypt_key().
Referenced by cSmartCardViaccess::Init(), cCardClientCommon::ParseKeyConfig(), cCardClientCamd35::ParseUserConfig(), cCmd0cCrypt::SetKey(), and cTPSDecrypt::TpsDecrypt().
{
AES_set_decrypt_key(key,128,&dkey);
AES_set_encrypt_key(key,128,&ekey);
active=true;
}