Remove redundant brackets
This commit is contained in:
parent
fa19117dfe
commit
18ae7a7b40
@ -32,19 +32,19 @@ data AEAD cipher = forall st . AEAD
|
|||||||
|
|
||||||
-- | Append some header information to an AEAD context
|
-- | Append some header information to an AEAD context
|
||||||
aeadAppendHeader :: ByteArrayAccess aad => AEAD cipher -> aad -> AEAD cipher
|
aeadAppendHeader :: ByteArrayAccess aad => AEAD cipher -> aad -> AEAD cipher
|
||||||
aeadAppendHeader (AEAD impl st) aad = AEAD impl $ (aeadImplAppendHeader impl) st aad
|
aeadAppendHeader (AEAD impl st) aad = AEAD impl $ aeadImplAppendHeader impl st aad
|
||||||
|
|
||||||
-- | Encrypt some data and update the AEAD context
|
-- | Encrypt some data and update the AEAD context
|
||||||
aeadEncrypt :: ByteArray ba => AEAD cipher -> ba -> (ba, AEAD cipher)
|
aeadEncrypt :: ByteArray ba => AEAD cipher -> ba -> (ba, AEAD cipher)
|
||||||
aeadEncrypt (AEAD impl st) ba = second (AEAD impl) $ (aeadImplEncrypt impl) st ba
|
aeadEncrypt (AEAD impl st) ba = second (AEAD impl) $ aeadImplEncrypt impl st ba
|
||||||
|
|
||||||
-- | Decrypt some data and update the AEAD context
|
-- | Decrypt some data and update the AEAD context
|
||||||
aeadDecrypt :: ByteArray ba => AEAD cipher -> ba -> (ba, AEAD cipher)
|
aeadDecrypt :: ByteArray ba => AEAD cipher -> ba -> (ba, AEAD cipher)
|
||||||
aeadDecrypt (AEAD impl st) ba = second (AEAD impl) $ (aeadImplDecrypt impl) st ba
|
aeadDecrypt (AEAD impl st) ba = second (AEAD impl) $ aeadImplDecrypt impl st ba
|
||||||
|
|
||||||
-- | Finalize the AEAD context and return the authentication tag
|
-- | Finalize the AEAD context and return the authentication tag
|
||||||
aeadFinalize :: AEAD cipher -> Int -> AuthTag
|
aeadFinalize :: AEAD cipher -> Int -> AuthTag
|
||||||
aeadFinalize (AEAD impl st) n = (aeadImplFinalize impl) st n
|
aeadFinalize (AEAD impl st) = aeadImplFinalize impl st
|
||||||
|
|
||||||
-- | Simple AEAD encryption
|
-- | Simple AEAD encryption
|
||||||
aeadSimpleEncrypt :: (ByteArrayAccess aad, ByteArray ba)
|
aeadSimpleEncrypt :: (ByteArrayAccess aad, ByteArray ba)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user