cryptohash-0.11.9: collection of crypto hashes, fast, pure and practical

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

Crypto.MAC.SHA3

Description

provide a simple SHA3 MAC mechanism with

    mac = hash(key|message)

Synopsis

- data MAC512 = MAC512 {
  - getDigest512 :: Digest SHA3_512
  }
- data MAC384 = MAC384 {
  - getDigest384 :: Digest SHA3_384
  }
- data MAC256 = MAC256 {
  - getDigest256 :: Digest SHA3_256
  }
- data MAC224 = MAC224 {
  - getDigest224 :: Digest SHA3_224
  }
- mac512 :: ByteString -> ByteString -> MAC512
- mac384 :: ByteString -> ByteString -> MAC384
- mac256 :: ByteString -> ByteString -> MAC256
- mac224 :: ByteString -> ByteString -> MAC224

# Documentation

data MAC512 Source #

SHA3_512 MAC

Constructors

MAC512 |

Fields

- getDigest512 :: Digest SHA3_512

Instances

Eq MAC512 Source # |
Instance details Defined in Crypto.MAC.SHA3 Methods (==) :: MAC512 -> MAC512 -> Bool Source # (/=) :: MAC512 -> MAC512 -> Bool Source #
Byteable MAC512 Source # |
Instance details Defined in Crypto.MAC.SHA3 Methods toBytes :: MAC512 -> ByteString Source # byteableLength :: MAC512 -> Int Source # withBytePtr :: MAC512 -> (Ptr Word8 -> IO b) -> IO b Source #

data MAC384 Source #

SHA3_384 MAC

Constructors

MAC384 |

Fields

- getDigest384 :: Digest SHA3_384

Instances

Eq MAC384 Source # |
Instance details Defined in Crypto.MAC.SHA3 Methods (==) :: MAC384 -> MAC384 -> Bool Source # (/=) :: MAC384 -> MAC384 -> Bool Source #
Byteable MAC384 Source # |
Instance details Defined in Crypto.MAC.SHA3 Methods toBytes :: MAC384 -> ByteString Source # byteableLength :: MAC384 -> Int Source # withBytePtr :: MAC384 -> (Ptr Word8 -> IO b) -> IO b Source #

data MAC256 Source #

SHA3_256 MAC

Constructors

MAC256 |

Fields

- getDigest256 :: Digest SHA3_256

Instances

Eq MAC256 Source # |
Instance details Defined in Crypto.MAC.SHA3 Methods (==) :: MAC256 -> MAC256 -> Bool Source # (/=) :: MAC256 -> MAC256 -> Bool Source #
Byteable MAC256 Source # |
Instance details Defined in Crypto.MAC.SHA3 Methods toBytes :: MAC256 -> ByteString Source # byteableLength :: MAC256 -> Int Source # withBytePtr :: MAC256 -> (Ptr Word8 -> IO b) -> IO b Source #

data MAC224 Source #

SHA3_224 MAC

Constructors

MAC224 |

Fields

- getDigest224 :: Digest SHA3_224

Instances

Eq MAC224 Source # |
Instance details Defined in Crypto.MAC.SHA3 Methods (==) :: MAC224 -> MAC224 -> Bool Source # (/=) :: MAC224 -> MAC224 -> Bool Source #
Byteable MAC224 Source # |
Instance details Defined in Crypto.MAC.SHA3 Methods toBytes :: MAC224 -> ByteString Source # byteableLength :: MAC224 -> Int Source # withBytePtr :: MAC224 -> (Ptr Word8 -> IO b) -> IO b Source #

mac512 Source #

Arguments

:: ByteString | secret
-> ByteString | message
-> MAC512 |

compute a MAC using a simple SHA3_512 key|msg

mac384 Source #

Arguments

:: ByteString | secret
-> ByteString | message
-> MAC384 |

compute a MAC using a simple SHA3_384 key|msg

mac256 Source #

Arguments

:: ByteString | secret
-> ByteString | message
-> MAC256 |

compute a MAC using a simple SHA3_256 key|msg

mac224 Source #

Arguments

:: ByteString | secret
-> ByteString | message
-> MAC224 |

compute a MAC using a simple SHA3_224 key|msg