just md5_hex( doesnt work.
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
05.05.2011 21:59, Lawrence Statton :
On 05/05/2011 10:53 AM, apm wrote:
I have old legacy code on .net 1.1 c#
Byte[] clearBytes = new UnicodeEncoding().GetBytes(cleanString);
Byte[] hashedBytes = ((HashAlgorithm)
CryptoConfig.CreateFromName("MD5")).ComputeHash(clearBytes);
return BitConverter.ToString(hashedBytes);
how convert it into perl?
i trying this:
use utf8;
use Digest::MD5 qw ( md5 md5_hex md5_base64);
return uc(md5_hex(unpack("U*",$pass)))
but hash differs.
also trying unpack("H*"...
Did just md5_hex($pass) not work?
To help you diagnose this, some octet-streams of passwords and what your
C# program hashed them to would be helpful.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/