in reply to Why applying MD5 hash twice?
hope that helps,#!/usr/bin/perl -iD9T4C`>_-JXF8NMS^$#)4=L/2X?!:@GF9;MGKH8\;O-S*8L'6 @A=unpack"N*",unpack u,$^I;@K=splice@A,5,4;sub M{($x=pop)-($m=1+~0)*in +t$x/$m}; sub L{$n=pop;($x=pop)<<$n|2**$n-1&$x>>32-$n}@F=(sub{$b&($c^$d)^$d},$S= +sub{$b^$c ^$d},sub{($b|$c)&$d|$b&$c},$S);do{$l+=$r=read STDIN,$_,64;$r++,$_.="\x +80"if$r< 64&&!$p++;@W=unpack N16,$_."\0"x7;$W[15]=$l*8 if$r<57;for(16..79){push +@W,L$W[$_ -3]^$W[$_-8]^$W[$_-14]^$W[$_-16],1}($a,$b,$c,$d,$e)=@A;for(0..79){$t=M +&{$F[$_/ 20]}+$e+$W[$_]+$K[$_/20]+L$a,5;$e=$d;$d=$c;$c=L$b,30;$b=$a;$a=$t}$v='a +';@A=map{ M$_+${$v++}}@A}while$r>56;printf'%.8x'x5 ."\n",@A
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Why applying MD5 hash twice?
by jryan (Vicar) on Sep 09, 2003 at 21:10 UTC | |
by shotgunefx (Parson) on Sep 09, 2003 at 21:51 UTC | |
by jryan (Vicar) on Sep 10, 2003 at 02:32 UTC | |
by shotgunefx (Parson) on Sep 10, 2003 at 07:12 UTC | |
by JackHammer (Acolyte) on Sep 10, 2003 at 04:03 UTC | |
by wufnik (Friar) on Sep 10, 2003 at 17:04 UTC | |
|
Re: Re: Why applying MD5 hash twice?
by gwadej (Chaplain) on Sep 09, 2003 at 23:42 UTC |