DES-OFB.test at [37325867e6]

File tests/test_vectors/Symetric_Block/DES-OFB.test artifact 97734d59d5 part of check-in 37325867e6


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

tcltest::test Symetric_Block_DES-OFB-1.1 {Encrypt DES-OFB} \
	-constraints DES_OFB \
	-body {binary encode hex [tls::encrypt -cipher DES-OFB -padding 0 \
		 -key [binary decode hex 0123456789abcdef] \
		 -iv [binary decode hex 1234567890abcdef] \
		 -data [binary decode hex 5765207468652070656f706c65206f662074686520556e69746564205374617465732c20696e206f7264657220746f20]]} \
	-match exact -result ea03351dc6e26e5538f81a3c22a637797b7641a66463fa8a0c9d1ead3ed113d70608a565602f23c421c8836e82c5f07b

tcltest::test Symetric_Block_DES-OFB-1.2 {Decrypt DES-OFB} \
	-constraints DES_OFB \
	-body {binary encode hex [tls::decrypt -cipher DES-OFB -padding 0 \
		 -key [binary decode hex 0123456789abcdef] \
		 -iv [binary decode hex 1234567890abcdef] \
		 -data [binary decode hex ea03351dc6e26e5538f81a3c22a637797b7641a66463fa8a0c9d1ead3ed113d70608a565602f23c421c8836e82c5f07b]]} \
	-match exact -result 5765207468652070656f706c65206f662074686520556e69746564205374617465732c20696e206f7264657220746f20

# Cleanup
::tcltest::cleanupTests
return