summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/bench/bmd5.pp
blob: c32fdd3a5036c9d556b17109870d5b77adabcc63 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{$mode objfpc}
uses
  timer,md5;


const
  Strings: array[1..7] of string = (
    '',
    'a',
    'abc',
    'message digest',
    'abcdefghijklmnopqrstuvwxyz',
    'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789',
    '12345678901234567890123456789012345678901234567890123456789012345678901234567890'
    );

var
  i,j : integer;
  s : string;
begin
  start;
  for i:=1 to 500000 do
    for j:=low(Strings) to high(Strings) do
      MDString(Strings[j],MD_VERSION_5);
  stop;
  writeln;
end.