37 int aesni_set_encrypt_key(
const unsigned char *userKey,
int bits,AES_KEY *key);
38 int aesni_set_decrypt_key(
const unsigned char *userKey,
int bits,AES_KEY *key);
39 void aesni_encrypt(
const unsigned char *in,
unsigned char *out,
41 void aesni_cbc_encrypt(
const unsigned char *in,
44 const AES_KEY *key,
unsigned char *ivec,
int enc);
65 #ifdef INTEL_IPP_CRYPTO
66 ippsRijndael128Init(key, IppsRijndaelKey128,
m_keyAES1);
136 if(in==NULL||out==NULL||
len==NULL||*
len==0)
138 #ifdef INTEL_IPP_CRYPTO
168 #ifdef INTEL_IPP_CRYPTO
170 UINT32 padlen=16-(inlen%16);
171 if(inlen+padlen>(*
len))
176 memcpy(tmp,in,inlen);
177 for(
UINT32 i=inlen; i<inlen+padlen; i++)
179 tmp[i]=(
UINT8)padlen;
182 AES_cbc_encrypt(tmp,out,inlen+padlen,
m_keyAES1,
m_iv1,AES_ENCRYPT);
184 aesni_cbc_encrypt(tmp,out,inlen+padlen,
m_keyAES1,
m_iv1,AES_ENCRYPT);
SINT32 encryptCBCwithPKCS7(const UINT8 *in, UINT32 inlen, UINT8 *out, UINT32 *len)
En-/Decryptes in to out using IV1 and key1.
SINT32 setKey(const UINT8 *key)
Sets the key for encryption.
SINT32 decryptCBCwithPKCS7(const UINT8 *in, UINT8 *out, UINT32 *len)
En-/Decryptes in to out using iv1 and key1.