/* AES Iv Set, sometimes added later */ int CRYPT_AES_IvSet(CRYPT_AES_CTX* aes, const unsigned char* iv) { if (aes == NULL || iv == NULL) return BAD_FUNC_ARG; return wc_AesSetIV((Aes*)aes, iv); }
void aes_encrypt(Aes *aes, unsigned char *cipher, const unsigned char *message) { wc_AesSetIV(aes, 0); wc_AesCbcEncrypt(aes, cipher, message, BLOCKSIZE); }