SHA512-256.test at [9bcee7c0e7]

File tests/test_vectors/Hash/SHA512-256.test artifact 87ec5e51fc part of check-in 9bcee7c0e7


# Auto generated from "SHA512-256.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 SHA512_256 [expr {[lsearch -nocase [tls::digests] SHA512-256] > -1}]
catch {tls::provider legacy}

tcltest::test Hash_SHA512-256-1.1 {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 \
	-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 \
	-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 \
	-setup {set data "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"} \
	-body {tls::digest -digest SHA512-256 -data $data} \
	-match exact -result 3928e184fb8690f840da3988121d31be65cb9d3ef83ee6146feac861e19b563a

# Cleanup
::tcltest::cleanupTests
return