scarhand Posted February 29, 2008 Share Posted February 29, 2008 sha1 is returning a binary value greater than 20 chars and i cant understand why heres code: <?php $info_hash = sha1($tfile, TRUE); echo $info_hash; ?> sha1 is supposed to return a 20 character binary value, but it is adding a "`" character to the end of it... Quote Link to comment https://forums.phpfreaks.com/topic/93750-sha1-returning-binary-value-with-a-length-greater-than-20-chars/ Share on other sites More sharing options...
ignace Posted February 29, 2008 Share Posted February 29, 2008 <?php $hash = sha1(time(), true); echo $hash . ' = ' . strlen($hash); // –ƒ$²¡öS„Ïô`Ï‚k]b = 20 ?> Quote Link to comment https://forums.phpfreaks.com/topic/93750-sha1-returning-binary-value-with-a-length-greater-than-20-chars/#findComment-480385 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.