SHA3-512.test at [eae5afbb83]

File tests/test_vectors/Hash/SHA3-512.test artifact 6da8f64028 part of check-in eae5afbb83


# Auto generated from "SHA3-512.txt"
lappend auto_path [file dirname [file dirname [file dirname [file dirname [file join [pwd] [info script]]]]]]
package require tls
package require tcltest

tcltest::testConstraint SHA3_512 [expr {[lsearch -nocase [tls::digests] SHA3-512] > -1}]
catch {tls::provider legacy}

tcltest::test Hash_SHA3-512-1.1 {SHA3-512} \
	-constraints SHA3_512 \
	-setup {set data ""} \
	-body {tls::digest -digest SHA3-512 -data $data} \
	-match exact -result a69f73cca23a9ac5c8b567dc185a756e97c982164fe25859e0d1dcc1475c80a615b2123af1f5f94c11e3e9402c3ac558f500199d95b6d3e301758586281dcd26

tcltest::test Hash_SHA3-512-1.2 {SHA3-512} \
	-constraints SHA3_512 \
	-setup {set data [binary decode hex [string repeat a3 200]]} \
	-body {tls::digest -digest SHA3-512 -data $data} \
	-match exact -result e76dfad22084a8b1467fcf2ffa58361bec7628edf5f3fdc0e4805dc48caeeca81b7c13c30adf52a3659584739a2df46be589c51ca1a4a8416df6545a1ce8ba00

tcltest::test Hash_SHA3-512-1.3 {SHA3-512} \
	-constraints SHA3_512 \
	-setup {set data "abc"} \
	-body {tls::digest -digest SHA3-512 -data $data} \
	-match exact -result b751850b1a57168a5693cd924b6b096e08f621827444f70d884f5d0240d2712e10e116e9192af3c91a7ec57647e3934057340b4cf408d5a56592f8274eec53f0

tcltest::test Hash_SHA3-512-1.4 {SHA3-512} \
	-constraints SHA3_512 \
	-setup {set data "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"} \
	-body {tls::digest -digest SHA3-512 -data $data} \
	-match exact -result 04a371e84ecfb5b8b77cb48610fca8182dd457ce6f326a0fd3d7ec2f1e91636dee691fbe0c985302ba1b0d8dc78c086346b533b49c030d99a27daf1139d6e75e

tcltest::test Hash_SHA3-512-1.5 {SHA3-512} \
	-constraints SHA3_512 \
	-setup {set data "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"} \
	-body {tls::digest -digest SHA3-512 -data $data} \
	-match exact -result afebb2ef542e6579c50cad06d2e578f9f8dd6881d7dc824d26360feebf18a4fa73e3261122948efcfd492e74e82e2189ed0fb440d187f382270cb455f21dd185

tcltest::test Hash_SHA3-512-1.6 {SHA3-512} \
	-constraints SHA3_512 \
	-setup {set data [string repeat "a" 1000000]} \
	-body {tls::digest -digest SHA3-512 -data $data} \
	-match exact -result 3c3a876da14034ab60627c077bb98f7e120a2a5370212dffb3385a18d4f38859ed311d0a9d5141ce9cc5c66ee689b266a8aa18ace8282a0e0db596c90b0a7b87

tcltest::test Hash_SHA3-512-1.7 {SHA3-512} \
	-constraints SHA3_512 \
	-setup {set data [string repeat "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmno" 16777216]} \
	-body {tls::digest -digest SHA3-512 -data $data} \
	-match exact -result 235ffd53504ef836a1342b488f483b396eabbfe642cf78ee0d31feec788b23d0d18d5c339550dd5958a500d4b95363da1b5fa18affc1bab2292dc63b7d85097c

# Cleanup
::tcltest::cleanupTests
return