Safe Haskell | None |
---|
256 and 512 bit Skein. Supports normal hashing and Skein-MAC.
- class Skein a where
- skeinMAC :: a -> ByteString -> a
- skein :: ByteString -> a
- class Serialize a => Threefish a b | a -> b where
- threefishKey :: Tweak -> a -> b
- threefishEncrypt :: a -> Tweak -> a -> a
- threefishDecrypt :: a -> Tweak -> a -> a
- toBlock :: ByteString -> Maybe a
- fromBlock :: a -> ByteString
- data Block256
- data Block512
- type Key256 = Block256
- type Key512 = Block512
- type Nonce256 = Block256
- hash256 :: Word64 -> Key256 -> ByteString -> ByteString
- hash512 :: Key512 -> ByteString -> Block512
Documentation
skeinMAC :: a -> ByteString -> aSource
Calculate the Skein-MAC of a message.
skein :: ByteString -> aSource
Calculate the Skein checksum of a message.
class Serialize a => Threefish a b | a -> b whereSource
threefishKey :: Tweak -> a -> bSource
Create a Threefish key using a custom tweak value.
threefishEncrypt :: a -> Tweak -> a -> aSource
Encrypt a block using the given key and tweak value.
threefishDecrypt :: a -> Tweak -> a -> aSource
Decrypt a block using the given key and tweak value.
toBlock :: ByteString -> Maybe aSource
Create an appropriately sized block.
fromBlock :: a -> ByteStringSource
Extract the contents of a block.
hash256 :: Word64 -> Key256 -> ByteString -> ByteStringSource
hash512 :: Key512 -> ByteString -> Block512Source
Hash a message using a particular key. For normal hashing, use all zeroes; for Skein-MAC, use the MAC key.