Safe Haskell | None |
---|
256 bit Skein as a stream cipher, as specified in the Skein 1.3 paper.
- 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 -> ByteStringSource
Encrypt a lazy ByteString using 256 bit Skein as a stream cipher.
decrypt :: Key256 -> Nonce256 -> ByteString -> ByteStringSource
Encryption and decryption are the same operation for a stream cipher, but we may want to have a function called encrypt for clarity.
toBlock :: Threefish a b => ByteString -> Maybe aSource
Create an appropriately sized block.
fromBlock :: Threefish a b => a -> ByteStringSource
Extract the contents of a block.