aboutsummaryrefslogtreecommitdiffstats
path: root/libtests/qtest
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2012-12-29 14:07:46 +0100
committerJay Berkenbilt <ejb@ql.org>2012-12-31 11:36:51 +0100
commit0873e4230047553c366dff11444d56fe9977b61f (patch)
tree39b67f8ecfd255cb01f07ce434763be8c936b006 /libtests/qtest
parentc9da66a018b6381eadfa3570d511b2a2341ebae8 (diff)
downloadqpdf-0873e4230047553c366dff11444d56fe9977b61f.tar.zst
SHA2 pipeline with support for 256, 384, and 512 bits
Implemented pipeline around sph sha calls using standard test vectors for full-byte values. Did not test or support partial byte values.
Diffstat (limited to 'libtests/qtest')
-rw-r--r--libtests/qtest/sha2.test18
-rw-r--r--libtests/qtest/sha2/sha2.out9
2 files changed, 27 insertions, 0 deletions
diff --git a/libtests/qtest/sha2.test b/libtests/qtest/sha2.test
new file mode 100644
index 00000000..34d668f7
--- /dev/null
+++ b/libtests/qtest/sha2.test
@@ -0,0 +1,18 @@
+#!/usr/bin/env perl
+require 5.008;
+BEGIN { $^W = 1; }
+use strict;
+
+chdir("sha2") or die "chdir testdir failed: $!\n";
+
+require TestDriver;
+
+my $td = new TestDriver('sha2');
+
+$td->runtest("sha2",
+ {$td->COMMAND => "sha2"},
+ {$td->FILE => "sha2.out",
+ $td->EXIT_STATUS => 0},
+ $td->NORMALIZE_NEWLINES);
+
+$td->report(1);
diff --git a/libtests/qtest/sha2/sha2.out b/libtests/qtest/sha2/sha2.out
new file mode 100644
index 00000000..702264fb
--- /dev/null
+++ b/libtests/qtest/sha2/sha2.out
@@ -0,0 +1,9 @@
+256 short: passed
+256 long: passed
+256 million: passed
+384 short: passed
+384 long: passed
+384 million: passed
+512 short: passed
+512 long: passed
+512 million: passed