SHA256.test at [7a89ccc39d]

File tests/test_vectors/Hash/SHA256.test artifact e73af40184 part of check-in 7a89ccc39d


# Auto generated from "SHA256.txt"
package require tls
package require tcltest

tcltest::testConstraint SHA256 [expr {[lsearch -nocase [tls::digests] SHA256] > -1}]

tcltest::test Hash_SHA256-1.1 {SHA256} \
	-constraints SHA256 \
	-setup {set data ""} \
	-body {tls::digest -digest SHA256 -data $data} \
	-match exact -result e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855

tcltest::test Hash_SHA256-1.2 {SHA256} \
	-constraints SHA256 \
	-setup {set data "abc"} \
	-body {tls::digest -digest SHA256 -data $data} \
	-match exact -result ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad

tcltest::test Hash_SHA256-1.3 {SHA256} \
	-constraints SHA256 \
	-setup {set data "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"} \
	-body {tls::digest -digest SHA256 -data $data} \
	-match exact -result 248d6a61d20638b8e5c026930c3e6039a33ce45964ff2167f6ecedd419db06c1

tcltest::test Hash_SHA256-1.4 {SHA256} \
	-constraints SHA256 \
	-setup {set data "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"} \
	-body {tls::digest -digest SHA256 -data $data} \
	-match exact -result cf5b16a778af8380036ce59e7b0492370b249b11e8f07a51afac45037afee9d1

tcltest::test Hash_SHA256-1.5 {SHA256} \
	-constraints SHA256 \
	-setup {set data [string repeat "a" 1000000]} \
	-body {tls::digest -digest SHA256 -data $data} \
	-match exact -result cdc76e5c9914fb9281a1c7e284d73e67f1809a48a497200e046d39ccc7112cd0

tcltest::test Hash_SHA256-1.6 {SHA256} \
	-constraints SHA256 \
	-setup {set data [string repeat "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmno" 16777216]} \
	-body {tls::digest -digest SHA256 -data $data} \
	-match exact -result 50e72a0e26442fe2552dc3938ac58658228c0cbfb1d2ca872ae435266fcd055e

tcltest::test Hash_SHA256-1.7 {SHA256} \
	-constraints SHA256 \
	-setup {set data [binary decode hex bd]} \
	-body {tls::digest -digest SHA256 -data $data} \
	-match exact -result 68325720aabd7c82f30f554b313d0570c95accbb7dc4b5aae11204c08ffe732b

tcltest::test Hash_SHA256-1.8 {SHA256} \
	-constraints SHA256 \
	-setup {set data [binary decode hex c98c8e55]} \
	-body {tls::digest -digest SHA256 -data $data} \
	-match exact -result 7abc22c0ae5af26ce93dbb94433a0e0b2e119d014f8e7f65bd56c61ccccd9504

tcltest::test Hash_SHA256-1.9 {SHA256} \
	-constraints SHA256 \
	-setup {set data [binary decode hex [string repeat 00 55]]} \
	-body {tls::digest -digest SHA256 -data $data} \
	-match exact -result 02779466cdec163811d078815c633f21901413081449002f24aa3e80f0b88ef7

tcltest::test Hash_SHA256-1.10 {SHA256} \
	-constraints SHA256 \
	-setup {set data [binary decode hex [string repeat 00 56]]} \
	-body {tls::digest -digest SHA256 -data $data} \
	-match exact -result d4817aa5497628e7c77e6b606107042bbba3130888c5f47a375e6179be789fbb

tcltest::test Hash_SHA256-1.11 {SHA256} \
	-constraints SHA256 \
	-setup {set data [binary decode hex [string repeat 00 57]]} \
	-body {tls::digest -digest SHA256 -data $data} \
	-match exact -result 65a16cb7861335d5ace3c60718b5052e44660726da4cd13bb745381b235a1785

tcltest::test Hash_SHA256-1.12 {SHA256} \
	-constraints SHA256 \
	-setup {set data [binary decode hex [string repeat 00 64]]} \
	-body {tls::digest -digest SHA256 -data $data} \
	-match exact -result f5a5fd42d16a20302798ef6ed309979b43003d2320d9f0e8ea9831a92759fb4b

tcltest::test Hash_SHA256-1.13 {SHA256} \
	-constraints SHA256 \
	-setup {set data [binary decode hex [string repeat 00 1000]]} \
	-body {tls::digest -digest SHA256 -data $data} \
	-match exact -result 541b3e9daa09b20bf85fa273e5cbd3e80185aa4ec298e765db87742b70138a53

tcltest::test Hash_SHA256-1.14 {SHA256} \
	-constraints SHA256 \
	-setup {set data [binary decode hex [string repeat 41 1000]]} \
	-body {tls::digest -digest SHA256 -data $data} \
	-match exact -result c2e686823489ced2017f6059b8b239318b6364f6dcd835d0a519105a1eadd6e4

tcltest::test Hash_SHA256-1.15 {SHA256} \
	-constraints SHA256 \
	-setup {set data [binary decode hex [string repeat 55 1005]]} \
	-body {tls::digest -digest SHA256 -data $data} \
	-match exact -result f4d62ddec0f3dd90ea1380fa16a5ff8dc4c54b21740650f24afc4120903552b0

tcltest::test Hash_SHA256-1.16 {SHA256} \
	-constraints SHA256 \
	-setup {set data [binary decode hex [string repeat 00 1000000]]} \
	-body {tls::digest -digest SHA256 -data $data} \
	-match exact -result d29751f2649b32ff572b5e0a9f541ea660a50f94ff0beedfb0b692b924cc8025

tcltest::test Hash_SHA256-1.17 {SHA256} \
	-constraints SHA256 \
	-setup {set data [binary decode hex [string repeat 5a 536870912]]} \
	-body {tls::digest -digest SHA256 -data $data} \
	-match exact -result 15a1868c12cc53951e182344277447cd0979536badcc512ad24c67e9b2d4f3dd

tcltest::test Hash_SHA256-1.18 {SHA256} \
	-constraints SHA256 \
	-setup {set data "The quick brown fox jumps over the lazy dog"} \
	-body {tls::digest -digest SHA256 -data $data} \
	-match exact -result d7a8fbb307d7809469ca9abcb0082e4f8d5651e46d3cdb762d02d0bf37c9e592

tcltest::test Hash_SHA256-1.19 {SHA256} \
	-constraints SHA256 \
	-setup {set data "abc"} \
	-body {tls::digest -digest SHA256 -data $data} \
	-match exact -result ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad

tcltest::test Hash_SHA256-1.20 {SHA256} \
	-constraints SHA256 \
	-setup {set data "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"} \
	-body {tls::digest -digest SHA256 -data $data} \
	-match exact -result 248d6a61d20638b8e5c026930c3e6039a33ce45964ff2167f6ecedd419db06c1

tcltest::test Hash_SHA256-1.21 {SHA256} \
	-constraints SHA256 \
	-setup {set data [string repeat "a" 1000000]} \
	-body {tls::digest -digest SHA256 -data $data} \
	-match exact -result cdc76e5c9914fb9281a1c7e284d73e67f1809a48a497200e046d39ccc7112cd0

tcltest::test Hash_SHA256-1.22 {SHA256} \
	-constraints SHA256 \
	-setup {set data [string repeat "0123456701234567012345670123456701234567012345670123456701234567" 10]} \
	-body {tls::digest -digest SHA256 -data $data} \
	-match exact -result 594847328451bdfa85056225462cc1d867d877fb388df0ce35f25ab5562bfbb5

tcltest::test Hash_SHA256-1.23 {SHA256} \
	-constraints SHA256 \
	-setup {set data [binary decode hex 19]} \
	-body {tls::digest -digest SHA256 -data $data} \
	-match exact -result 68aa2e2ee5dff96e3355e6c7ee373e3d6a4e17f75f9518d843709c0c9bc3e3d4

tcltest::test Hash_SHA256-1.24 {SHA256} \
	-constraints SHA256 \
	-setup {set data [binary decode hex e3d72570dcdd787ce3887ab2cd684652]} \
	-body {tls::digest -digest SHA256 -data $data} \
	-match exact -result 175ee69b02ba9b58e2b0a5fd13819cea573f3940a94f825128cf4209beabb4e8

tcltest::test Hash_SHA256-1.25 {SHA256} \
	-constraints SHA256 \
	-setup {set data [binary decode hex 8326754e2277372f4fc12b20527afef04d8a056971b11ad57123a7c137760000d7bef6f3c1f7a9083aa39d810db310777dab8b1e7f02b84a26c773325f8b2374de7a4b5a58cb5c5cf35bcee6fb946e5bd694fa593a8beb3f9d6592ecedaa66ca82a29d0c51bcf9336230e5d784e4c0a43f8d79a30a165cbabe452b774b9c7109a97d138f129228966f6c0adc106aad5a9fdd30825769b2c671af6759df28eb393d54d6]} \
	-body {tls::digest -digest SHA256 -data $data} \
	-match exact -result 97dbca7df46d62c8a422c941dd7e835b8ad3361763f7e9b2d95f4f0da6e1ccbc

# Cleanup
::tcltest::cleanupTests
return