| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Crypto.Threefish.Skein
Description
256 and 512 bit Skein. Supports "normal" hashing and Skein-MAC.
Synopsis
- 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
Methods
skeinMAC :: a -> ByteString -> a Source #
Calculate the Skein-MAC of a message.
skein :: ByteString -> a Source #
Calculate the Skein checksum of a message.
Instances
| Skein Block256 Source # | |
Defined in Crypto.Threefish.Skein | |
| Skein Block512 Source # | |
Defined in Crypto.Threefish.Skein | |
class Serialize a => Threefish a b | a -> b where Source #
Methods
threefishKey :: Tweak -> a -> b Source #
Create a Threefish key using a custom tweak value.
threefishEncrypt :: a -> Tweak -> a -> a Source #
Encrypt a block using the given key and tweak value.
threefishDecrypt :: a -> Tweak -> a -> a Source #
Decrypt a block using the given key and tweak value.
toBlock :: ByteString -> Maybe a Source #
Create an appropriately sized block.
fromBlock :: a -> ByteString Source #
Extract the contents of a block.
Instances
| Threefish Block256 Threefish256 Source # | |
Defined in Crypto.Threefish | |
| Threefish Block512 Threefish512 Source # | |
Defined in Crypto.Threefish | |
hash256 :: Word64 -> Key256 -> ByteString -> ByteString Source #