Lines Matching refs:length
512 static int ccm_auth_crypt(mbedtls_ccm_context *ctx, int mode, size_t length, in ccm_auth_crypt() argument
525 if ((ret = mbedtls_ccm_set_lengths(ctx, add_len, length, tag_len)) != 0) { in ccm_auth_crypt()
533 if ((ret = mbedtls_ccm_update(ctx, input, length, in ccm_auth_crypt()
534 output, length, &olen)) != 0) { in ccm_auth_crypt()
548 int mbedtls_ccm_star_encrypt_and_tag(mbedtls_ccm_context *ctx, size_t length, in mbedtls_ccm_star_encrypt_and_tag() argument
554 return ccm_auth_crypt(ctx, MBEDTLS_CCM_STAR_ENCRYPT, length, iv, iv_len, in mbedtls_ccm_star_encrypt_and_tag()
558 int mbedtls_ccm_encrypt_and_tag(mbedtls_ccm_context *ctx, size_t length, in mbedtls_ccm_encrypt_and_tag() argument
564 return ccm_auth_crypt(ctx, MBEDTLS_CCM_ENCRYPT, length, iv, iv_len, in mbedtls_ccm_encrypt_and_tag()
585 static int ccm_auth_decrypt(mbedtls_ccm_context *ctx, int mode, size_t length, in ccm_auth_decrypt() argument
594 if ((ret = ccm_auth_crypt(ctx, mode, length, in ccm_auth_decrypt()
601 mbedtls_platform_zeroize(output, length); in ccm_auth_decrypt()
608 int mbedtls_ccm_star_auth_decrypt(mbedtls_ccm_context *ctx, size_t length, in mbedtls_ccm_star_auth_decrypt() argument
614 return ccm_auth_decrypt(ctx, MBEDTLS_CCM_STAR_DECRYPT, length, in mbedtls_ccm_star_auth_decrypt()
619 int mbedtls_ccm_auth_decrypt(mbedtls_ccm_context *ctx, size_t length, in mbedtls_ccm_auth_decrypt() argument
625 return ccm_auth_decrypt(ctx, MBEDTLS_CCM_DECRYPT, length, in mbedtls_ccm_auth_decrypt()