[vlc-devel] [PATCH 03/14] test: md5: update test to use new md5 hash API
Marvin Scholz
epirat07 at gmail.com
Wed Apr 1 21:47:31 CEST 2020
---
src/test/md5.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/test/md5.c b/src/test/md5.c
index f99f2ff3a0..c2a2c82841 100644
--- a/src/test/md5.c
+++ b/src/test/md5.c
@@ -28,7 +28,7 @@
#include <string.h>
#include <vlc_common.h>
-#include <vlc_md5.h>
+#include <vlc_hash.h>
typedef struct
{
@@ -55,11 +55,10 @@ static void test_vlc_hash_md5()
{
for( int i = 0; md5_samples[i].psz_string; i++ )
{
- struct md5_s md5;
- InitMD5( &md5 );
- AddMD5( &md5, md5_samples[i].psz_string, strlen( md5_samples[i].psz_string ) );
- EndMD5( &md5 );
- char * psz_hash = psz_md5_hash( &md5 );
+ vlc_hash_md5_t md5;
+ vlc_hash_md5_Init( &md5 );
+ vlc_hash_md5_Update( &md5, md5_samples[i].psz_string, strlen( md5_samples[i].psz_string ) );
+ char *psz_hash = vlc_hash_md5_FinishHex( &md5 );
if( strcmp( psz_hash, md5_samples[i].psz_md5 ) )
{
--
2.24.1 (Apple Git-126)
More information about the vlc-devel
mailing list