aead

Pure Haskell AEAD-ChaCha20-Poly1305 (docs.ppad.tech/aead).
git clone git://git.ppad.tech/aead.git
Log | Files | Refs | README | LICENSE

commit 55d52287a32462bfad65008771c9949eb9dea0b6
parent b6179f44be357fb8737a3c00e5e9e29dc8c8249e
Author: Jared Tobin <jared@jtobin.io>
Date:   Sun, 22 Jun 2025 22:53:48 +0400

lib: docs for error type

Diffstat:
Mlib/Crypto/AEAD/ChaCha20Poly1305.hs | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lib/Crypto/AEAD/ChaCha20Poly1305.hs b/lib/Crypto/AEAD/ChaCha20Poly1305.hs @@ -72,10 +72,11 @@ pad16 (BI.PS _ _ l) | otherwise = BS.replicate (16 - l `rem` 16) 0 {-# INLINE pad16 #-} +-- | Error values. data Error = - InvalidKey - | InvalidNonce - | InvalidMAC + InvalidKey -- ^ the provided key was not 256 bits long + | InvalidNonce -- ^ the provided nonce was not 96 bits long + | InvalidMAC -- ^ the provided MAC does not authenticate the ciphertext deriving (Eq, Show) -- RFC8439 2.8