1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-29 11:41:15 +03:00

Add ChaCha20 to the Cipher module

This commit is contained in:
Daniel King
2016-05-15 19:56:20 -03:00
committed by Manuel Pégourié-Gonnard
parent 34b822ce7b
commit bd92062269
8 changed files with 231 additions and 4 deletions

View File

@ -245,7 +245,7 @@ int mbedtls_chacha20_starts( mbedtls_chacha20_context* ctx,
return( 0 );
}
int mbedtls_chacha20_process( mbedtls_chacha20_context *ctx,
int mbedtls_chacha20_update( mbedtls_chacha20_context *ctx,
size_t size,
const unsigned char *input,
unsigned char *output )
@ -333,7 +333,7 @@ int mbedtls_chacha20_crypt( const unsigned char key[32],
if ( result != 0 )
goto cleanup;
result = mbedtls_chacha20_process( &ctx, data_len, input, output );
result = mbedtls_chacha20_update( &ctx, data_len, input, output );
cleanup:
mbedtls_chacha20_free( &ctx );