Re: linux sha1sum .vs php sha1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



well, echoing a file name and hashing this name with an added carriage
return is not the same as hashing the string you can see in your file.
bye


echo -n 123 | sha1sum && php -r 'echo sha1(123)." -\n";'


2009/3/20 bruce <bedouglas@xxxxxxxxxxxxx>:
> hi...
>
> doing some testing with linux sha1sum, and php's sha1 function... are they
> both supposed to return the same results for the same chunk of text.
>
> test
>
> file "a.dat" = "1234567890"
>
> linux:
>  echo a.dat > sha1sum -t    != php <? sha1("1234567890"); ?>
>
> any thoughts...
>
> thanks
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux