forked from wolfSSL/wolfssl
Merge pull request #6417 from kareem-wolfssl/docUpdates
Update AES and Chacha documentation.
This commit is contained in:
@ -136,8 +136,10 @@ int wc_AesCbcEncrypt(Aes* aes, byte* out,
|
|||||||
\param aes pointer to the AES object used to decrypt data.
|
\param aes pointer to the AES object used to decrypt data.
|
||||||
\param out pointer to the output buffer in which to store the plain text
|
\param out pointer to the output buffer in which to store the plain text
|
||||||
of the decrypted message.
|
of the decrypted message.
|
||||||
|
size must be a multiple of AES_BLOCK_LENGTH, padded if necessary
|
||||||
\param in pointer to the input buffer containing cipher text to be
|
\param in pointer to the input buffer containing cipher text to be
|
||||||
decrypted.
|
decrypted.
|
||||||
|
size must be a multiple of AES_BLOCK_LENGTH, padded if necessary
|
||||||
\param sz size of input message.
|
\param sz size of input message.
|
||||||
|
|
||||||
_Example_
|
_Example_
|
||||||
@ -176,7 +178,9 @@ int wc_AesCbcDecrypt(Aes* aes, byte* out,
|
|||||||
\param aes pointer to the AES object used to decrypt data
|
\param aes pointer to the AES object used to decrypt data
|
||||||
\param out pointer to the output buffer in which to store the cipher
|
\param out pointer to the output buffer in which to store the cipher
|
||||||
text of the encrypted message
|
text of the encrypted message
|
||||||
|
size must be a multiple of AES_BLOCK_LENGTH, padded if necessary
|
||||||
\param in pointer to the input buffer containing plain text to be encrypted
|
\param in pointer to the input buffer containing plain text to be encrypted
|
||||||
|
size must be a multiple of AES_BLOCK_LENGTH, padded if necessary
|
||||||
\param sz size of the input plain text
|
\param sz size of the input plain text
|
||||||
|
|
||||||
_Example_
|
_Example_
|
||||||
@ -353,7 +357,9 @@ int wc_AesGcmSetKey(Aes* aes, const byte* key, word32 len);
|
|||||||
|
|
||||||
\param aes - pointer to the AES object used to encrypt data
|
\param aes - pointer to the AES object used to encrypt data
|
||||||
\param out pointer to the output buffer in which to store the cipher text
|
\param out pointer to the output buffer in which to store the cipher text
|
||||||
|
size must match in's size (sz)
|
||||||
\param in pointer to the input buffer holding the message to encrypt
|
\param in pointer to the input buffer holding the message to encrypt
|
||||||
|
size must be a multiple of AES_BLOCK_LENGTH, padded if necessary
|
||||||
\param sz length of the input message to encrypt
|
\param sz length of the input message to encrypt
|
||||||
\param iv pointer to the buffer containing the initialization vector
|
\param iv pointer to the buffer containing the initialization vector
|
||||||
\param ivSz length of the initialization vector
|
\param ivSz length of the initialization vector
|
||||||
@ -403,7 +409,9 @@ int wc_AesGcmEncrypt(Aes* aes, byte* out,
|
|||||||
|
|
||||||
\param aes pointer to the AES object used to encrypt data
|
\param aes pointer to the AES object used to encrypt data
|
||||||
\param out pointer to the output buffer in which to store the message text
|
\param out pointer to the output buffer in which to store the message text
|
||||||
|
size must match in's size (sz)
|
||||||
\param in pointer to the input buffer holding the cipher text to decrypt
|
\param in pointer to the input buffer holding the cipher text to decrypt
|
||||||
|
size must be a multiple of AES_BLOCK_LENGTH, padded if necessary
|
||||||
\param sz length of the cipher text to decrypt
|
\param sz length of the cipher text to decrypt
|
||||||
\param iv pointer to the buffer containing the initialization vector
|
\param iv pointer to the buffer containing the initialization vector
|
||||||
\param ivSz length of the initialization vector
|
\param ivSz length of the initialization vector
|
||||||
|
@ -97,7 +97,7 @@ int wc_ChaCha20Poly1305_Encrypt(
|
|||||||
byte plain[sizeof(cipher)];
|
byte plain[sizeof(cipher)];
|
||||||
|
|
||||||
int ret = wc_ChaCha20Poly1305_Decrypt(key, iv, inAAD, sizeof(inAAD),
|
int ret = wc_ChaCha20Poly1305_Decrypt(key, iv, inAAD, sizeof(inAAD),
|
||||||
cipher, sizeof(cipher), plain, authTag);
|
cipher, sizeof(cipher), authTag, plain);
|
||||||
|
|
||||||
if(ret == MAC_CMP_FAILED_E) {
|
if(ret == MAC_CMP_FAILED_E) {
|
||||||
// error during authentication
|
// error during authentication
|
||||||
|
Reference in New Issue
Block a user