Artifact [c0534f2c09]

Artifact c0534f2c0979b6c34d638d62ea26ed7b7e65fa033378a3622af3a4061e11c253:


# 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 Symetric_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 Symetric_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