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
28
29
30
|
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
28
29
30
31
32
33
|
-
+
-
+
-
+
-
+
-
+
+
+
+
|
# Auto generated from "SHA512-256.txt"
package require tls
package require tcltest
tcltest::testConstraint SHA512-256 [expr {[lsearch -nocase [tls::digests] SHA512-256] > -1}]
tcltest::testConstraint SHA512_256 [expr {[lsearch -nocase [tls::digests] SHA512-256] > -1}]
tcltest::test Hash_SHA512-256-1.1 {SHA512-256} \
-constraints SHA512-256 \
-constraints SHA512_256 \
-setup {set data ""} \
-body {tls::digest -digest SHA512-256 -data $data} \
-match exact -result c672b8d1ef56ed28ab87c3622c5114069bdd3ad7b8f9737498d0c01ecef0967a
tcltest::test Hash_SHA512-256-1.2 {SHA512-256} \
-constraints SHA512-256 \
-constraints SHA512_256 \
-setup {set data "abc"} \
-body {tls::digest -digest SHA512-256 -data $data} \
-match exact -result 53048e2681941ef99b2e29b76b4c7dabe4c2d0c634fc6d46e0e2f13107e7af23
tcltest::test Hash_SHA512-256-1.3 {SHA512-256} \
-constraints SHA512-256 \
-constraints SHA512_256 \
-setup {set data "The quick brown fox jumps over the lazy dog"} \
-body {tls::digest -digest SHA512-256 -data $data} \
-match exact -result dd9d67b371519c339ed8dbd25af90e976a1eeefd4ad3d889005e532fc5bef04d
tcltest::test Hash_SHA512-256-1.4 {SHA512-256} \
-constraints SHA512-256 \
-constraints SHA512_256 \
-setup {set data "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"} \
-body {tls::digest -digest SHA512-256 -data $data} \
-match exact -result 3928e184fb8690f840da3988121d31be65cb9d3ef83ee6146feac861e19b563a
# Cleanup
::tcltest::cleanupTests
return
|