HydrogenAudio

Hydrogenaudio Forum => General Audio => Topic started by: HTS on 2007-11-09 04:19:32

Title: md5sum?
Post by: HTS on 2007-11-09 04:19:32
How do you use the md5sum thing to check for download accuracy? Or is there a better way to do it?
Title: md5sum?
Post by: eevan on 2007-11-09 11:15:27
The site from which you download should provide you with the md5 checksum of the original file. Then you compute the md5 of the file you've downloaded and compare it with the provided one. They should match. If not, the file is corrupt.

I use a little freeware tool called DPASHA (http://www.paehl.de/english.php) that can compute various checksums on a file and compare the result with the one in the clipboard

EDIT: You should notice that for an audio file, one must compute md5 on the audio data itself, excluding the tags, headers etc. You can use SHNTOOL (http://www.etree.org/shnutils/shntool/) to do that.
Title: md5sum?
Post by: smok3 on 2007-11-09 12:29:18
if you use total commander, there is an option under 'files' called 'verify CRC checksums..' (or just double-click the md5 if it is located next to the file(s))
Title: md5sum?
Post by: SamHain86 on 2007-11-09 15:42:21
If you use windows, there is a helpful utility called Hash Tab. When looking at the properties of a file in Windows, it adds the File Hashes tab that includes the MD5, CRC-32 and SHA-1 hashes. http://www.beeblebrox.org/hashtab/ (http://www.beeblebrox.org/hashtab/)
Title: md5sum?
Post by: HTS on 2007-11-09 16:08:00
How do I know what the md5sum of the original file is? does the site have to tell you?
Title: md5sum?
Post by: SamHain86 on 2007-11-09 16:31:45
Yes, the site would have to tell you what the original MD5 of the file was. Often, sites just have an additional TXT file with the MD5 hash in it, usually <FILE>.MD5.
Title: md5sum?
Post by: legg on 2007-11-09 17:07:34
Info in graphical mode: http://www.openoffice.org/dev_docs/using_md5sums.html (http://www.openoffice.org/dev_docs/using_md5sums.html)

Or if you're like me and would rather do it from the command line:
http://www.etree.org/md5com.html (http://www.etree.org/md5com.html)
Code: [Select]
md5sum -c file_that_contains_md5sum_info
Title: md5sum?
Post by: HTS on 2007-11-09 22:00:36
The website gave out the crc instead, is there a code for the CRC32?

Nevermind, I see that hashtab does it also.

Is the CRC the same as the CRC32?
Title: md5sum?
Post by: SamHain86 on 2007-11-09 22:11:06
Is the CRC the same as the CRC32?

While there are other CRC hashing methods, I believe the standard today is CRC-32 check sum. If the hashes match then yes it was implied CRC-32 check sum, if they do not match then they might have used a different hashing algorithm or your file is corrupted.
Title: md5sum?
Post by: HTS on 2007-11-09 22:21:59
Is the CRC the same as the CRC32?

While there are other CRC hashing methods, I believe the standard today is CRC-32 check sum. If the hashes match then yes it was implied CRC-32 check sum, if they do not match then they might have used a different hashing algorithm or your file is corrupted.

None of the files match. Are downloads most often inaccurate?

If the file is corrupted, will the file even play?
Title: md5sum?
Post by: eevan on 2007-11-09 22:30:39
Have you read my post carefully?
You didn't say what are you referring to. The audio or data file.
Title: md5sum?
Post by: SamHain86 on 2007-11-09 22:31:39
@HTS
-I don't expect downloaded files to be inaccurate. What are these files, where are you getting them from, how are you downloading them, and is something editing the file as it is being downloaded (e.g. a comment field added like "downloaded with ....")?

Be wary before playing these files. If it is a hash you are given and it does not match your current files' hashes, something is wrong on either your end or the site's end.

EDIT: @eevan, I didn't even read your post, sorry about that. You raise a valid point. While I cannot image a site that would give the CRC hash of the audio data itself without a hash of the entire file (with tags, etc), it could be so in this case.
Title: md5sum?
Post by: HTS on 2007-11-09 22:32:48
Have you read my post carefully?
You didn't say what are you referring to. The audio or data file.

I compared it to the file. I'll try your program to find the audio itself.
Title: md5sum?
Post by: HTS on 2007-11-09 22:46:17
Have you read my post carefully?
You didn't say what are you referring to. The audio or data file.

I have installed shntool, how do I use shntool to compute the CRC of the file?
Title: md5sum?
Post by: eevan on 2007-11-09 23:02:27
shntool can compute either MD5 or SHA1 hash of the raw pcm data in any of the supported formats (you also need a decoder for that format somewhere in the PATH or in the directory where you've installed shntool). It does not compute CRC32.

If it is an FLAC file, you write this at the prompt:
Code: [Select]
shntool hash -m -i "flac" "<path>\filename.flac"

and you get the MD5 for a flac file.

EDIT: @SamHain86, Yes, you're also right. The sites usually give the MD5 hash of the entire file, not just of the audio part
Title: md5sum?
Post by: HTS on 2007-11-09 23:07:23
shntool can compute either MD5 or SHA1 hash of the raw pcm data in any of the supported formats (you also need a decoder for that format somewhere in the PATH or in the directory where you've installed shntool). It does not compute CRC32.

If it is an FLAC file, you write this at the prompt:
Code: [Select]
shntool hash -m -i "flac" "<path>\filename.flac"

and you get the MD5 for a flac file.

So I can't get the CRC with shntool? Then which tool can I use to get the CRC for the audio?
Title: md5sum?
Post by: SamHain86 on 2007-11-09 23:34:58
Where are you getting these files?

The site may have notes that instruct you how to compare your file to the given CRC.

So where are you getting these files?
Title: md5sum?
Post by: HTS on 2007-11-09 23:54:41
Where are you getting these files?

The site may have notes that instruct you how to compare your file to the given CRC.

So where are you getting these files?

They are soundtracks for games on game sites. The files come in a winrar folder, which has a CRC32 tab beside the file descriptions.
Title: md5sum?
Post by: SamHain86 on 2007-11-10 00:02:38
Then the file's CRC-32 hash (mentioned in the RAR archive details) should be identical to the hash given to you in hash-tab after you extract the contents of the archive. The CRC32 hash done by WinRAR is the hash of the file data---not the audio data, not anything else.
Title: md5sum?
Post by: HTS on 2007-11-11 00:39:56
What does the Foobar's verify integrity thing do? It's under the Utility tab, It always says OK when I verify them. How does Foobar know what the original file is supposed to be like?
Title: md5sum?
Post by: SamHain86 on 2007-11-11 12:53:05
What version of FooBar2000 are you using? I have been using only recently (since 0.9.3, last year) and I do not recall any "Verify" utility. If it anything comparable to VLC's verify then it does nothing more than test the continuity of your audio files. Also what codec are these files? WAV, FLAC, WV, MP3, OGG...?