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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+
+
+
|
# Auto generated from "SHA3-256.txt"
package require tls
package require tcltest
tcltest::testConstraint SHA3-256 [expr {[lsearch -nocase [tls::digests] SHA3-256] > -1}]
tcltest::testConstraint SHA3_256 [expr {[lsearch -nocase [tls::digests] SHA3-256] > -1}]
tcltest::test Hash_SHA3-256-1.1 {SHA3-256} \
-constraints SHA3-256 \
-constraints SHA3_256 \
-setup {set data ""} \
-body {tls::digest -digest SHA3-256 -data $data} \
-match exact -result a7ffc6f8bf1ed76651c14756a061d662f580ff4de43b49fa82d80a4b80f8434a
tcltest::test Hash_SHA3-256-1.2 {SHA3-256} \
-constraints SHA3-256 \
-constraints SHA3_256 \
-setup {set data [binary decode hex [string repeat a3 200]]} \
-body {tls::digest -digest SHA3-256 -data $data} \
-match exact -result 79f38adec5c20307a98ef76e8324afbfd46cfd81b22e3973c65fa1bd9de31787
tcltest::test Hash_SHA3-256-1.3 {SHA3-256} \
-constraints SHA3-256 \
-constraints SHA3_256 \
-setup {set data "abc"} \
-body {tls::digest -digest SHA3-256 -data $data} \
-match exact -result 3a985da74fe225b2045c172d6bd390bd855f086e3e9d525b46bfe24511431532
tcltest::test Hash_SHA3-256-1.4 {SHA3-256} \
-constraints SHA3-256 \
-constraints SHA3_256 \
-setup {set data "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"} \
-body {tls::digest -digest SHA3-256 -data $data} \
-match exact -result 41c0dba2a9d6240849100376a8235e2c82e1b9998a999e21db32dd97496d3376
tcltest::test Hash_SHA3-256-1.5 {SHA3-256} \
-constraints SHA3-256 \
-constraints SHA3_256 \
-setup {set data "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"} \
-body {tls::digest -digest SHA3-256 -data $data} \
-match exact -result 916f6061fe879741ca6469b43971dfdb28b1a32dc36cb3254e812be27aad1d18
tcltest::test Hash_SHA3-256-1.6 {SHA3-256} \
-constraints SHA3-256 \
-constraints SHA3_256 \
-setup {set data [string repeat "a" 1000000]} \
-body {tls::digest -digest SHA3-256 -data $data} \
-match exact -result 5c8875ae474a3634ba4fd55ec85bffd661f32aca75c6d699d0cdcb6c115891c1
tcltest::test Hash_SHA3-256-1.7 {SHA3-256} \
-constraints SHA3-256 \
-constraints SHA3_256 \
-setup {set data [string repeat "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmno" 16777216]} \
-body {tls::digest -digest SHA3-256 -data $data} \
-match exact -result ecbbc42cbf296603acb2c6bc0410ef4378bafb24b710357f12df607758b33e2b
# Cleanup
::tcltest::cleanupTests
return
|