Crypto.Cipher.Camellia

cryptocipher-0.2.8: Symmetrical Block, Stream and PubKey Ciphers

License | BSD-style
Maintainer | Vincent Hanquez <vincent@snarc.org>
Stability | experimental
Portability | Good
Safe Haskell | None
Language | Haskell98

Crypto.Cipher.Camellia

Description

this only cover Camellia 128 bits for now, API will change once 192 and 256 mode are implemented too

Synopsis

- data Key = Key {
  - k :: Vector Word64
  - kw :: Vector Word64
  - ke :: Vector Word64
  }
- initKey :: ByteString -> Either String Key
- encrypt :: Key -> ByteString -> ByteString
- decrypt :: Key -> ByteString -> ByteString

# Documentation

data Key

Constructors

Key |
Fields k :: Vector Word64 kw :: Vector Word64 ke :: Vector Word64

Instances

Show Key |

initKey :: ByteString -> Either String Key

encrypt :: Key -> ByteString -> ByteString

encrypt with the key a bytestring and returns the encrypted bytestring

decrypt :: Key -> ByteString -> ByteString

decrypt with the key a bytestring and returns the encrypted bytestring