1# David Ireland's test vector - SHA-256 digest of "a" x 536870912 2 3# Adapted from Julius Duque's original script (t/24-ireland.tmp) 4# - modified to use state cache via putstate method 5 6use strict; 7use Digest::SHA; 8 9print "1..1\n"; 10 11my $rsp = "b9045a713caed5dff3d3b783e98d1ce5778d8bc331ee4119d707072312af06a7"; 12 13my $sha; 14if ($sha = Digest::SHA->putstate(join('', <DATA>))) { 15 $sha->add("aa"); 16 print "not " unless $sha->hexdigest eq $rsp; 17 print "ok 1\n"; 18} 19else { print "not ok 1\n" } 20 21__DATA__ 22 23 # Verify comments/blank lines ignored in state data 24 25alg:256 26H:dd75eb45:02d4f043:06b41193:6fda751d:73064db9:787d54e1:52dc3fe0:48687dfa 27 28block:61:61:61:61:61:61:61:61:61:61:61:61:61:61:61:61:61:61:61:61:61:61:61:61:61:61:61:61:61:61:61:61:61:61:61:61:61:61:61:61:61:61:61:61:61:61:61:61:61:61:61:61:61:61:61:61:61:61:61:61:61:61:00:00 29blockcnt:496 30 31lenhh:0 32lenhl:0 33lenlh:0 34 35# Note: add'ing two more bytes will cause lenll (below) to overflow 36 37lenll:4294967280 38