Crypto.MAC.SHA3

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 #

SHA3_512 MAC

Constructors

MAC512 |
Fields getDigest512 :: Digest SHA3_512

Instances

Eq MAC512 # |
Methods (==) :: MAC512 -> MAC512 -> Bool # (/=) :: MAC512 -> MAC512 -> Bool #
Byteable MAC512 # |
Methods toBytes :: MAC512 -> ByteString # byteableLength :: MAC512 -> Int # withBytePtr :: MAC512 -> (Ptr Word8 -> IO b) -> IO b #

data MAC384 #

SHA3_384 MAC

Constructors

MAC384 |
Fields getDigest384 :: Digest SHA3_384

Instances

Eq MAC384 # |
Methods (==) :: MAC384 -> MAC384 -> Bool # (/=) :: MAC384 -> MAC384 -> Bool #
Byteable MAC384 # |
Methods toBytes :: MAC384 -> ByteString # byteableLength :: MAC384 -> Int # withBytePtr :: MAC384 -> (Ptr Word8 -> IO b) -> IO b #

data MAC256 #

SHA3_256 MAC

Constructors

MAC256 |
Fields getDigest256 :: Digest SHA3_256

Instances

Eq MAC256 # |
Methods (==) :: MAC256 -> MAC256 -> Bool # (/=) :: MAC256 -> MAC256 -> Bool #
Byteable MAC256 # |
Methods toBytes :: MAC256 -> ByteString # byteableLength :: MAC256 -> Int # withBytePtr :: MAC256 -> (Ptr Word8 -> IO b) -> IO b #

data MAC224 #

SHA3_224 MAC

Constructors

MAC224 |
Fields getDigest224 :: Digest SHA3_224

Instances

Eq MAC224 # |
Methods (==) :: MAC224 -> MAC224 -> Bool # (/=) :: MAC224 -> MAC224 -> Bool #
Byteable MAC224 # |
Methods toBytes :: MAC224 -> ByteString # byteableLength :: MAC224 -> Int # withBytePtr :: MAC224 -> (Ptr Word8 -> IO b) -> IO b #

mac512 #

Arguments

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

compute a MAC using a simple SHA3_512 key|msg

mac384 #

Arguments

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

compute a MAC using a simple SHA3_384 key|msg

mac256 #

Arguments

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

compute a MAC using a simple SHA3_256 key|msg

mac224 #

Arguments

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

compute a MAC using a simple SHA3_224 key|msg