Artifact [a320826719]

Artifact a32082671941f45715bc467de1d954b64f036199bf243578cc355983a462d555:


# Auto generated from "HMAC_SHA3-224.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 HMAC [expr {[lsearch -nocase [tls::macs] HMAC] > -1}]
tcltest::testConstraint SHA3_224 [expr {[lsearch -nocase [tls::digests] SHA3-224] > -1}]
catch {tls::provider legacy}

tcltest::test MAC_HMAC-SHA3-224-1.1 {HMAC_SHA3-224} \
	-constraints {HMAC SHA3_224 } \
	-setup {} \
	-body {string range [tls::hmac -hex -digest SHA3-224 -key [binary decode hex 000102030405060708090a0b0c0d0e0f101112131415161718191a1b] -data "Sample message for keylen<blocklen"] 0 55} \
	-match exact -result 332cfd59347fdb8e576e77260be4aba2d6dc53117b3bfb52c6d18c04

tcltest::test MAC_HMAC-SHA3-224-1.2 {HMAC_SHA3-224} \
	-constraints {HMAC SHA3_224 } \
	-setup {} \
	-body {string range [tls::hmac -hex -digest SHA3-224 -key [binary decode hex 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f] -data "Sample message for keylen=blocklen"] 0 55} \
	-match exact -result d8b733bcf66c644a12323d564e24dcf3fc75f231f3b67968359100c7

tcltest::test MAC_HMAC-SHA3-224-1.3 {HMAC_SHA3-224} \
	-constraints {HMAC SHA3_224 } \
	-setup {} \
	-body {string range [tls::hmac -hex -digest SHA3-224 -key [binary decode hex 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaab] -data "Sample message for keylen>blocklen"] 0 55} \
	-match exact -result 078695eecc227c636ad31d063a15dd05a7e819a66ec6d8de1e193e59

tcltest::test MAC_HMAC-SHA3-224-1.4 {HMAC_SHA3-224} \
	-constraints {HMAC SHA3_224 } \
	-setup {} \
	-body {string range [tls::hmac -hex -digest SHA3-224 -key [binary decode hex 000102030405060708090a0b0c0d0e0f101112131415161718191a1b] -data "Sample message for keylen<blocklen, with truncated tag"] 0 27} \
	-match exact -result 8569c54cbb00a9b78ff1b391b0e5

# Cleanup
::tcltest::cleanupTests
return