Merge pull request #281 from embhorn/zd13475

Note direction in SetKey for CTR and CFB example
pull/70/head
David Garske 2022-03-16 10:34:15 -07:00 committed by GitHub
commit 448591eed3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -189,6 +189,7 @@ int AesDecrypt(Aes* aes, byte* key, int size, FILE* inFile, FILE* outFile)
return -1050;
/* sets key */
/* decrypt uses AES_ENCRYPTION */
ret = wc_AesSetKey(aes, key, AES_BLOCK_SIZE, iv, AES_ENCRYPTION);
if (ret != 0)
return -1002;

View File

@ -165,6 +165,7 @@ int AesCtrDecrypt(Aes* aes, byte* key, int size, FILE* inFile, FILE* outFile)
return -1050;
/* sets key */
/* decrypt uses AES_ENCRYPTION */
ret = wc_AesSetKey(aes, key, AES_BLOCK_SIZE, iv, AES_ENCRYPTION);
if (ret != 0)
return -1002;