Artifact [6dc07bce40]
EuroTcl/OpenACS 11 - 12 JULY 2024, VIENNA

Artifact 6dc07bce40f57fb145ea0767a9af2e64f6f23c9acee74f12fe034c99dd32a790:


# Auto generated from "AES-128-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_128_CFB8 [expr {[lsearch -nocase [tls::ciphers] AES-128-CFB8] > -1}]

tcltest::test Block_AES-128-CFB8-1.1 {Encrypt AES-128-CFB8} \
	-constraints AES_128_CFB8 \
	-body {binary encode hex [tls::encrypt -cipher AES-128-CFB8 -padding 0 \
		 -key [binary decode hex 2b7e151628aed2a6abf7158809cf4f3c] \
		 -iv [binary decode hex 000102030405060708090a0b0c0d0e0f] \
		 -data [binary decode hex 6bc1bee22e409f96e93d7e117393172aae2d]]} \
	-match exact -result 3b79424c9c0dd436bace9e0ed4586a4f32b9

tcltest::test Block_AES-128-CFB8-1.2 {Decrypt AES-128-CFB8} \
	-constraints AES_128_CFB8 \
	-body {binary encode hex [tls::decrypt -cipher AES-128-CFB8 -padding 0 \
		 -key [binary decode hex 2b7e151628aed2a6abf7158809cf4f3c] \
		 -iv [binary decode hex 000102030405060708090a0b0c0d0e0f] \
		 -data [binary decode hex 3b79424c9c0dd436bace9e0ed4586a4f32b9]]} \
	-match exact -result 6bc1bee22e409f96e93d7e117393172aae2d

# Cleanup
::tcltest::cleanupTests
return