Skip to content

Commit a5106ec

Browse files
Merge pull request #6417 from kareem-wolfssl/docUpdates
Update AES and Chacha documentation.
2 parents 5194a29 + 6cb2c84 commit a5106ec

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

doc/dox_comments/header_files/aes.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,10 @@ int wc_AesCbcEncrypt(Aes* aes, byte* out,
136136
\param aes pointer to the AES object used to decrypt data.
137137
\param out pointer to the output buffer in which to store the plain text
138138
of the decrypted message.
139+
size must be a multiple of AES_BLOCK_LENGTH, padded if necessary
139140
\param in pointer to the input buffer containing cipher text to be
140141
decrypted.
142+
size must be a multiple of AES_BLOCK_LENGTH, padded if necessary
141143
\param sz size of input message.
142144
143145
_Example_
@@ -176,7 +178,9 @@ int wc_AesCbcDecrypt(Aes* aes, byte* out,
176178
\param aes pointer to the AES object used to decrypt data
177179
\param out pointer to the output buffer in which to store the cipher
178180
text of the encrypted message
181+
size must be a multiple of AES_BLOCK_LENGTH, padded if necessary
179182
\param in pointer to the input buffer containing plain text to be encrypted
183+
size must be a multiple of AES_BLOCK_LENGTH, padded if necessary
180184
\param sz size of the input plain text
181185
182186
_Example_
@@ -353,7 +357,9 @@ int wc_AesGcmSetKey(Aes* aes, const byte* key, word32 len);
353357
354358
\param aes - pointer to the AES object used to encrypt data
355359
\param out pointer to the output buffer in which to store the cipher text
360+
size must match in's size (sz)
356361
\param in pointer to the input buffer holding the message to encrypt
362+
size must be a multiple of AES_BLOCK_LENGTH, padded if necessary
357363
\param sz length of the input message to encrypt
358364
\param iv pointer to the buffer containing the initialization vector
359365
\param ivSz length of the initialization vector
@@ -403,7 +409,9 @@ int wc_AesGcmEncrypt(Aes* aes, byte* out,
403409
404410
\param aes pointer to the AES object used to encrypt data
405411
\param out pointer to the output buffer in which to store the message text
412+
size must match in's size (sz)
406413
\param in pointer to the input buffer holding the cipher text to decrypt
414+
size must be a multiple of AES_BLOCK_LENGTH, padded if necessary
407415
\param sz length of the cipher text to decrypt
408416
\param iv pointer to the buffer containing the initialization vector
409417
\param ivSz length of the initialization vector

doc/dox_comments/header_files/chacha20_poly1305.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ int wc_ChaCha20Poly1305_Encrypt(
9797
byte plain[sizeof(cipher)];
9898
9999
int ret = wc_ChaCha20Poly1305_Decrypt(key, iv, inAAD, sizeof(inAAD),
100-
cipher, sizeof(cipher), plain, authTag);
100+
cipher, sizeof(cipher), authTag, plain);
101101
102102
if(ret == MAC_CMP_FAILED_E) {
103103
// error during authentication

0 commit comments

Comments
 (0)