]> git.sesse.net Git - vlc/blobdiff - src/misc/update.c
messages: save one byte
[vlc] / src / misc / update.c
index cefb6e3c62a96b57c97d95e4c79b377d93b11c32..b00eb27bbf79dc78e922472aa6812e329659c9d7 100644 (file)
@@ -307,7 +307,7 @@ static bool GetUpdateFile( update_t *p_update )
             goto error;
         }
 
-        uint8_t *p_hash = hash_sha1_from_public_key( p_new_pkey );
+        uint8_t *p_hash = hash_from_public_key( p_new_pkey );
         if( !p_hash )
         {
             msg_Err( p_update->p_libvlc, "Failed to hash signature" );
@@ -332,17 +332,17 @@ static bool GetUpdateFile( update_t *p_update )
         }
     }
 
-    uint8_t *p_hash = hash_sha1_from_text( psz_update_data, &sign );
+    uint8_t *p_hash = hash_from_text( psz_update_data, &sign );
     if( !p_hash )
     {
-        msg_Warn( p_update->p_libvlc, "Can't compute SHA1 hash for status file" );
+        msg_Warn( p_update->p_libvlc, "Can't compute hash for status file" );
         goto error;
     }
 
     else if( p_hash[0] != sign.hash_verification[0] ||
         p_hash[1] != sign.hash_verification[1] )
     {
-        msg_Warn( p_update->p_libvlc, "Bad SHA1 hash for status file" );
+        msg_Warn( p_update->p_libvlc, "Bad hash for status file" );
         free( p_hash );
         goto error;
     }
@@ -671,7 +671,7 @@ static void* update_DownloadReal( void *obj )
         goto end;
     }
 
-    uint8_t *p_hash = hash_sha1_from_file( psz_destfile, &sign );
+    uint8_t *p_hash = hash_from_file( psz_destfile, &sign );
     if( !p_hash )
     {
         msg_Err( p_udt, "Unable to hash %s", psz_destfile );
@@ -691,7 +691,7 @@ static void* update_DownloadReal( void *obj )
         dialog_FatalWait( p_udt, _("File corrupted"),
             _("Downloaded file \"%s\" was corrupted. Thus, it was deleted."),
              psz_destfile );
-        msg_Err( p_udt, "Bad SHA1 hash for %s", psz_destfile );
+        msg_Err( p_udt, "Bad hash for %s", psz_destfile );
         free( p_hash );
         goto end;
     }