Initial project import
This commit is contained in:
commit
23f2d29e32
11957 files changed
+1754577
No files matched your search
@@ -0,0 +1,18 @@
|
||||
import crypto.cipher
|
||||
import crypto.des
|
||||
|
||||
struct StreamCipher {
|
||||
cipher cipher.Stream
|
||||
}
|
||||
|
||||
fn test_cfb_stream_cipher() ! {
|
||||
key := '123456789012345678901234'.bytes()
|
||||
iv := 'abcdegfh'.bytes()
|
||||
|
||||
block := des.new_cipher(key[..8])
|
||||
c := cipher.new_cfb_encrypter(block, iv)
|
||||
|
||||
s := StreamCipher{
|
||||
cipher: c
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user