Artifact [8f01a4d3af]
EuroTcl/OpenACS 11 - 12 JULY 2024, VIENNA

Artifact 8f01a4d3af4ede04cd41ea6303a0888355c2a440d5f739078136aff282781e6e:


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

catch {tls::provider legacy}
tcltest::testConstraint AES_256_CFB8 [expr {[lsearch -nocase [tls::ciphers] AES-256-CFB8] > -1}]

tcltest::test Block_AES-256-CFB8-1.1 {Encrypt AES-256-CFB8} \
	-constraints AES_256_CFB8 \
	-body {binary encode hex [tls::encrypt -cipher AES-256-CFB8 -padding 0 \
		 -key [binary decode hex 603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4] \
		 -iv [binary decode hex 000102030405060708090a0b0c0d0e0f] \
		 -data [binary decode hex 6bc1bee22e409f96e93d7e117393172aae2d]]} \
	-match exact -result dc1f1a8520a64db55fcc8ac554844e889700

tcltest::test Block_AES-256-CFB8-1.2 {Decrypt AES-256-CFB8} \
	-constraints AES_256_CFB8 \
	-body {binary encode hex [tls::decrypt -cipher AES-256-CFB8 -padding 0 \
		 -key [binary decode hex 603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4] \
		 -iv [binary decode hex 000102030405060708090a0b0c0d0e0f] \
		 -data [binary decode hex dc1f1a8520a64db55fcc8ac554844e889700]]} \
	-match exact -result 6bc1bee22e409f96e93d7e117393172aae2d

# Cleanup
::tcltest::cleanupTests
return