X-Git-Url: http://www.lcore.org/git/lcore.git/blobdiff_plain/f04a1a66b7abbe12528bd0ced49ec44932343f41..3f8290b4a13c15cf62776aa427f62a8ae77ee07c:/fastmd5.pas?ds=inline diff --git a/fastmd5.pas b/fastmd5.pas index 891d0fc..6f2d66f 100644 --- a/fastmd5.pas +++ b/fastmd5.pas @@ -39,7 +39,7 @@ type {$i uint32.inc} type - dvar=array[0..0] of byte; + dvar=array[0..65535] of byte; Tmd5state=record buf:array[0..63] of byte; H:array[0..3] of uint32; @@ -55,13 +55,13 @@ procedure md5finish(var state:tmd5state;var result); procedure getmd5(const data;len:longint;var result); -function md5tostr(const md5:tmd5):string; +function md5tostr(const md5:tmd5):ansistring; implementation -function inttohex(val,bits:integer):string; +function inttohex(val,bits:integer):ansistring; const - hexchar:array[0..15] of char='0123456789abcdef'; + hexchar:array[0..15] of ansichar='0123456789abcdef'; begin inttohex := hexchar[val shr 4]+hexchar[val and $f]; end; @@ -284,10 +284,10 @@ begin md5finish(t,result); end; -function md5tostr(const md5:tmd5):string; +function md5tostr(const md5:tmd5):ansistring; var a:integer; - s:string; + s:ansistring; begin s := ''; for a := 0 to 15 do s := s + inttohex(md5[a],2);