Artifact [49f880056a]
EuroTcl/OpenACS 11 - 12 JULY 2024, VIENNA

Artifact 49f880056a7859d042c6441a7a583cd6521945d4640697f54c350bd849b60396:


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

tcltest::test Block_DES-CFB8-1.1 {Encrypt DES-CFB8} \
	-constraints DES_CFB8 \
	-body {binary encode hex [tls::encrypt -cipher DES-CFB8 -padding 0 \
		 -key [binary decode hex 0123456789abcdef] \
		 -iv [binary decode hex 1234567890abcdef] \
		 -data [binary decode hex 4e6f7720697320746865]]} \
	-match exact -result f31fda07011462ee187f

tcltest::test Block_DES-CFB8-1.2 {Decrypt DES-CFB8} \
	-constraints DES_CFB8 \
	-body {binary encode hex [tls::decrypt -cipher DES-CFB8 -padding 0 \
		 -key [binary decode hex 0123456789abcdef] \
		 -iv [binary decode hex 1234567890abcdef] \
		 -data [binary decode hex f31fda07011462ee187f]]} \
	-match exact -result 4e6f7720697320746865

# Cleanup
::tcltest::cleanupTests
return