Commit | Line | Data |
6bc89f92 |
1 | use Test; |
2 | use strict; |
3 | use integer; |
4 | use Digest::SHA qw(sha512_hex); |
5 | |
41c686de |
6 | BEGIN { |
77d2a621 |
7 | if ($ENV{PERL_CORE}) { |
8 | chdir 't' if -d 't'; |
9 | @INC = '../lib'; |
10 | } |
41c686de |
11 | } |
12 | |
6bc89f92 |
13 | my(@vec, @rsp); |
14 | |
77d2a621 |
15 | BEGIN { |
6bc89f92 |
16 | @vec = ( |
17 | "abc", |
18 | "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu", |
19 | "a" x 1000000 |
20 | ); |
21 | |
22 | @rsp = ( |
23 | "ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f", |
24 | "8e959b75dae313da8cf4f72814fc143f8f7779c6eb9f7fa17299aeadb6889018501d289e4900f7e4331b99dec4b5433ac7d329eeb6dd26545e96e55b874be909", |
25 | "e718483d0ce769644e2e42c7bc15b4638e1f98b13b2044285632a803afa973ebde0ff244877ea60a4cb0432ce577c31beb009c5c2c49aa2e4eadb217ad8cc09b" |
26 | ); |
27 | |
28 | plan tests => scalar(@vec); |
29 | } |
30 | |
31 | my $skip = sha512_hex("") ? 0 : 1; |
32 | |
33 | for (my $i = 0; $i < @vec; $i++) { |
34 | skip($skip, sha512_hex($vec[$i]), $rsp[$i]); |
35 | } |