cryptonite-0.24: Cryptography Primitives sink

LicenseBSD-style
MaintainerVincent Hanquez <vincent@snarc.org>
Stabilityexperimental
Portabilityunknown
Safe HaskellNone
LanguageHaskell2010

Crypto.MAC.Poly1305

Contents

Description

Poly1305 implementation

Synopsis

Documentation

type Ctx = State Source #

Deprecated: use Poly1305 State instead

Poly1305 State. use State instead of Ctx

data State Source #

Poly1305 State

Instances

ByteArrayAccess State Source # 

Methods

length :: State -> Int #

withByteArray :: State -> (Ptr p -> IO a) -> IO a #

newtype Auth Source #

Poly1305 Auth

Constructors

Auth Bytes 

Instances

Eq Auth Source # 

Methods

(==) :: Auth -> Auth -> Bool #

(/=) :: Auth -> Auth -> Bool #

NFData Auth Source # 

Methods

rnf :: Auth -> () #

ByteArrayAccess Auth Source # 

Methods

length :: Auth -> Int #

withByteArray :: Auth -> (Ptr p -> IO a) -> IO a #

Incremental MAC Functions

initialize :: ByteArrayAccess key => key -> CryptoFailable State Source #

initialize a Poly1305 context

update :: ByteArrayAccess ba => State -> ba -> State Source #

update a context with a bytestring

updates :: ByteArrayAccess ba => State -> [ba] -> State Source #

updates a context with multiples bytestring

finalize :: State -> Auth Source #

finalize the context into a digest bytestring

One-pass MAC function

auth :: (ByteArrayAccess key, ByteArrayAccess ba) => key -> ba -> Auth Source #

One-pass authorization creation