php - sha1, crc32, and md5 how to read this data? -


how can decode md5, crc32, , sha1, below xml file , code i'm using data far.

<files>   <file name="attheinn-germany-morrow78collection.mp3" source="original">     <format>vbr mp3</format>     <title>at inn - germany - morrow 78 collection</title>     <md5>056bbd63961450d9684ca54b35caed45</md5>     <creator>germany</creator>     <album>morrow 78 collection</album>     <mtime>1256879264</mtime>     <size>2165481</size>     <crc32>22bab6a</crc32>     <sha1>796fccc9b9dd9732612ee626c615050fd5d7483c</sha1>     <length>179.59</length>   </file> 

and code i'm using title , album name how can make sense of sha1 , md5, any direction helpful, thanks

<?php     $search = $_get['sku'];     $catalogfile = $_get['file'];         $directory = "feeds/";         $xmlfile = $directory . $catalogfile; $xml = simplexml_load_file($xmlfile);  list($product) = $xml->xpath("//file[crc32 = '$search']"); echo "<head>"; echo "<title>$product->title</title>"; 

hash functions generate numbers represent arbitrary data. can used verify if data has changed (a hash function should produce totally different hash single bit has changed).

since turning arbitrary amount of data in number result loose information, means it's hard reverse them. technically there infinite number of possible results hash data can length. limited data sizes still possible there multiple data values specific hash, called collision.

for data sets (for example passwords) can generate possible combinations of data , check see if match hash. if generation @ same time checking it's known 'brute forcing'. can store possible combinations (for limited range, example dictionary works or combinations of characters under specific size), up. known rainbow table , useful reversing multiple hashes.

it's practice store passwords hash rather in plain text ensure passwords hard reverse add bit of random data each 1 , store along passwords, known salting. salt means takes longer brute force password.

in case hashes of mp3 file specified verify file integrity , show corruption occurs during transfer (or storage). won't possible reverse them since have generate possible combinations of megabytes of data. if have file there wouldn't reason too. can confirm hashes of file running checksum generating program on it.


Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

C# WinForm - loading screen -