cryptonite-0.8: Cryptography Primitives sink

LicenseBSD-style
MaintainerVincent Hanquez <vincent@snarc.org>
Stabilitystable
Portabilitygood
Safe HaskellNone
LanguageHaskell2010

Crypto.Cipher.ChaChaPoly1305

Description

A simple AEAD scheme using ChaCha20 and Poly1305.

See RFC7539.

Synopsis

Documentation

nonce12 :: ByteArrayAccess iv => iv -> CryptoFailable Nonce Source

Nonce smart constructor 12 bytes IV, nonce constructor

nonce8 Source

Arguments

:: ByteArrayAccess ba 
=> ba

4 bytes constant

-> ba

8 bytes IV

-> CryptoFailable Nonce 

8 bytes IV, nonce constructor

incrementNonce :: Nonce -> Nonce Source

Increment a nonce

encrypt :: ByteArray ba => ba -> State -> (ba, State) Source

decrypt :: ByteArray ba => ba -> State -> (ba, State) Source