mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2026-03-27 00:32:58 +00:00
Adapt programs / test suites
This commit is contained in:
@@ -22,6 +22,8 @@ void pbkdf2_hmac( int hash, char *hex_password_string,
|
||||
int pw_len, salt_len;
|
||||
unsigned char key[100];
|
||||
|
||||
md_init( &ctx );
|
||||
|
||||
memset(pw_str, 0x00, 100);
|
||||
memset(salt_str, 0x00, 100);
|
||||
memset(dst_str, 0x00, 100);
|
||||
@@ -37,7 +39,7 @@ void pbkdf2_hmac( int hash, char *hex_password_string,
|
||||
TEST_ASSERT( md_init_ctx( &ctx, info ) == 0 );
|
||||
TEST_ASSERT( pkcs5_pbkdf2_hmac( &ctx, pw_str, pw_len, salt_str, salt_len,
|
||||
it_cnt, key_len, key ) == 0 );
|
||||
TEST_ASSERT( md_free_ctx( &ctx ) == 0 );
|
||||
md_free( &ctx );
|
||||
|
||||
hexify( dst_str, key, key_len );
|
||||
TEST_ASSERT( strcmp( (char *) dst_str, result_key_string ) == 0 );
|
||||
|
||||
Reference in New Issue
Block a user