v/vlib/crypto/cipher/ctr_test.v

19 lines
294 B
V

import crypto.cipher
import crypto.des
struct StreamCipher {
cipher cipher.Stream
}
fn test_ctr_stream_cipher() ! {
key := '123456789012345678901234'.bytes()
iv := 'abcdegfh'.bytes()
block := des.new_cipher(key[..8])
c := cipher.new_ctr(block, iv)
s := StreamCipher{
cipher: c
}
}