Initial commit
This commit is contained in:
commit
c101616e62
309 changed files with 53937 additions and 0 deletions
28
bundled/Crypto/Cipher/Camellia.hs
Normal file
28
bundled/Crypto/Cipher/Camellia.hs
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
-- |
|
||||
-- Module : Crypto.Cipher.Camellia
|
||||
-- License : BSD-style
|
||||
-- Maintainer : Vincent Hanquez <vincent@snarc.org>
|
||||
-- Stability : experimental
|
||||
-- Portability : Good
|
||||
--
|
||||
-- Camellia support. only 128 bit variant available for now.
|
||||
|
||||
module Crypto.Cipher.Camellia
|
||||
( Camellia128
|
||||
) where
|
||||
|
||||
import Crypto.Cipher.Camellia.Primitive
|
||||
import Crypto.Cipher.Types
|
||||
|
||||
-- | Camellia block cipher with 128 bit key
|
||||
newtype Camellia128 = Camellia128 Camellia
|
||||
|
||||
instance Cipher Camellia128 where
|
||||
cipherName _ = "Camellia128"
|
||||
cipherKeySize _ = KeySizeFixed 16
|
||||
cipherInit k = Camellia128 `fmap` initCamellia k
|
||||
|
||||
instance BlockCipher Camellia128 where
|
||||
blockSize _ = 16
|
||||
ecbEncrypt (Camellia128 key) = encrypt key
|
||||
ecbDecrypt (Camellia128 key) = decrypt key
|
||||
Loading…
Add table
Add a link
Reference in a new issue