| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Crypto.Threefish.Skein.StreamCipher
Description
256 bit Skein as a stream cipher, as specified in the Skein 1.3 paper.
Synopsis
- type Key256 = Block256
- type Nonce256 = Block256
- data Block256
- encrypt :: Key256 -> Nonce256 -> ByteString -> ByteString
- decrypt :: Key256 -> Nonce256 -> ByteString -> ByteString
- toBlock :: Threefish a b => ByteString -> Maybe a
- fromBlock :: Threefish a b => a -> ByteString
Documentation
encrypt :: Key256 -> Nonce256 -> ByteString -> ByteString Source #
Encrypt a lazy ByteString using 256 bit Skein as a stream cipher.
decrypt :: Key256 -> Nonce256 -> ByteString -> ByteString Source #
Encryption and decryption are the same operation for a stream cipher, but we may want to have a function called encrypt for clarity.
fromBlock :: Threefish a b => a -> ByteString Source #
Extract the contents of a block.