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

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

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

# Cleanup
::tcltest::cleanupTests
return
