FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/wolfcrypt/src/poly1305.c
/*  Takes a Poly1305 struct that has a key loaded and adds the AEAD length
    encoding in 64-bit little endian
    aadSz      : Size of the additional authentication data
    dataSz     : Size of the plaintext or ciphertext
 */
Takes a Poly1305 struct that has a key loaded and adds the AEAD length
encoding in 64-bit little endian
aadSz      : Size of the additional authentication data
dataSz     : Size of the plaintext or ciphertext
Takes a Poly1305 struct that has a key loaded and adds the AEAD length encoding in 64 - bit little endian aadSz : Size of the additional authentication data dataSz : Size of the plaintext or ciphertext
int wc_Poly1305_EncodeSizes(Poly1305* ctx, word32 aadSz, word32 dataSz)
{
    int ret;
    byte little64[16]; 
    if (ctx == NULL) {
        return BAD_FUNC_ARG;
    }
    XMEMSET(little64, 0, sizeof(little64));
    u32tole64(aadSz,  little64);
    u32tole64(dataSz, little64 + 8);
    ret = wc_Poly1305Update(ctx, little64, sizeof(little64));
    return ret;
}
int wc_Poly1305_EncodeSizes ( Poly1305 * ctx , word32 aadSz , word32 dataSz ) { int ret ; byte little64 [ 16 ] ; if ( ctx == NULL ) { return BAD_FUNC_ARG ; } XMEMSET ( little64 , 0 , sizeof ( little64 ) ) ; u32tole64 ( aadSz , little64 ) ; u32tole64 ( dataSz , little64 + 8 ) ; ret = wc_Poly1305Update ( ctx , little64 , sizeof ( little64 ) ) ; return ret ; }
Takes a Poly1305 struct that has a key loaded and adds the AEAD length
encoding in 64-bit little endian
aadSz      : Size of the additional authentication data
dataSz     : Size of the plaintext or ciphertext
Takes a Poly1305 struct that has a key loaded and adds the AEAD length encoding in 64 - bit little endian aadSz : Size of the additional authentication data dataSz : Size of the plaintext or ciphertext
/* sizeof(word64) * 2 */ /* size of additional data and input data as little endian 64 bit types */