License | BSD-style |
---|---|
Maintainer | Vincent Hanquez <vincent@snarc.org> |
Stability | experimental |
Portability | unknown |
Safe Haskell | None |
Language | Haskell2010 |
Poly1305 implementation
Synopsis
- type Ctx = State
- data State
- newtype Auth = Auth Bytes
- authTag :: ByteArrayAccess b => b -> CryptoFailable Auth
- initialize :: ByteArrayAccess key => key -> CryptoFailable State
- update :: ByteArrayAccess ba => State -> ba -> State
- updates :: ByteArrayAccess ba => State -> [ba] -> State
- finalize :: State -> Auth
- auth :: (ByteArrayAccess key, ByteArrayAccess ba) => key -> ba -> Auth
Documentation
Poly1305 State
This type is an instance of ByteArrayAccess
for debugging purpose. Internal
layout is architecture dependent, may contain uninitialized data fragments,
and change in future versions. The bytearray should not be used as input to
cryptographic algorithms.
Instances
Poly1305 Auth
Instances
Eq Auth # | |
NFData Auth # | |
Defined in Crypto.MAC.Poly1305 | |
ByteArrayAccess Auth # | |
authTag :: ByteArrayAccess b => b -> CryptoFailable Auth #
Incremental MAC Functions
initialize :: ByteArrayAccess key => key -> CryptoFailable State #
initialize a Poly1305 context
update :: ByteArrayAccess ba => State -> ba -> State #
update a context with a bytestring
updates :: ByteArrayAccess ba => State -> [ba] -> State #
updates a context with multiples bytestring
One-pass MAC function
auth :: (ByteArrayAccess key, ByteArrayAccess ba) => key -> ba -> Auth #
One-pass authorization creation