Answer was:
    my $bytes=encode("utf16LE", $pass);
    my $md5=uc(md5_hex($bytes));


06.05.2011 03:29, Natal Ngétal пишет:
Le jeudi 05 mai 2011 à 10:34:51, apm a écrit :
For example, that c# code return
C3-1A-C6-05-79-3F-58-0B-38-6C-0F-B5-3F-1B-97-75
for string 12345
With string 12345. I have try with md5sum and
md5_hex().
echo -n 12345 | md5sum
827ccb0eea8a706c4c34a16891f84e7b

I have the same result with md5_hex()

use strict;
use warnings;

use Digest::MD5 qw ( md5_hex );

print md5_hex("12345"), "\n";

I think that the function works well md5_hex. I do not know c #, so I do
not try, sorry.




--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to