Rename the _ret() functions
Signed-off-by: TRodziewicz <tomasz.rodziewicz@mobica.com>
diff --git a/library/md2.c b/library/md2.c
index a11bc0f..e02c2f0 100644
--- a/library/md2.c
+++ b/library/md2.c
@@ -96,7 +96,7 @@
/*
* MD2 context setup
*/
-int mbedtls_md2_starts_ret( mbedtls_md2_context *ctx )
+int mbedtls_md2_starts( mbedtls_md2_context *ctx )
{
memset( ctx->cksum, 0, 16 );
memset( ctx->state, 0, 46 );
@@ -151,7 +151,7 @@
/*
* MD2 process buffer
*/
-int mbedtls_md2_update_ret( mbedtls_md2_context *ctx,
+int mbedtls_md2_update( mbedtls_md2_context *ctx,
const unsigned char *input,
size_t ilen )
{
@@ -185,7 +185,7 @@
/*
* MD2 final digest
*/
-int mbedtls_md2_finish_ret( mbedtls_md2_context *ctx,
+int mbedtls_md2_finish( mbedtls_md2_context *ctx,
unsigned char output[16] )
{
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
@@ -214,7 +214,7 @@
/*
* output = MD2( input buffer )
*/
-int mbedtls_md2_ret( const unsigned char *input,
+int mbedtls_md2( const unsigned char *input,
size_t ilen,
unsigned char output[16] )
{
@@ -223,13 +223,13 @@
mbedtls_md2_init( &ctx );
- if( ( ret = mbedtls_md2_starts_ret( &ctx ) ) != 0 )
+ if( ( ret = mbedtls_md2_starts( &ctx ) ) != 0 )
goto exit;
- if( ( ret = mbedtls_md2_update_ret( &ctx, input, ilen ) ) != 0 )
+ if( ( ret = mbedtls_md2_update( &ctx, input, ilen ) ) != 0 )
goto exit;
- if( ( ret = mbedtls_md2_finish_ret( &ctx, output ) ) != 0 )
+ if( ( ret = mbedtls_md2_finish( &ctx, output ) ) != 0 )
goto exit;
exit:
@@ -290,7 +290,7 @@
if( verbose != 0 )
mbedtls_printf( " MD2 test #%d: ", i + 1 );
- ret = mbedtls_md2_ret( md2_test_str[i], md2_test_strlen[i], md2sum );
+ ret = mbedtls_md2( md2_test_str[i], md2_test_strlen[i], md2sum );
if( ret != 0 )
goto fail;