crypton/Crypto/Cipher
kinoru 5a2809a0f8 [ChaChaPoly1305] fix type error of example code
The example code had a type mismatch.

    Couldn't match expected type ‘State’
                with actual type ‘CryptoFailable State’
    In the second argument of ‘appendAAD’, namely ‘st1’
    In the second argument of ‘($)’, namely ‘appendAAD hdr st1’

This is due to the following part:

    let st1 = ChaChaPoly1305.initialize key nonce
        st2 = ChaChaPoly1305.finalizeAAD $ ChaChaPoly1305.appendAAD hdr st1

`initialize` returns `CryptoFailable State`, not `State`.

This commit fixes the type mismatch, changes the return type of the
example function to `CryptoFailable ByteString`, and makes the code
to be immediately copy-and-paste-able.
2015-12-03 18:05:04 +00:00
..
AES Remove unused AES primitives functions and exports 2015-06-09 11:45:39 +02:00
Blowfish [blowfish] remove unnecessary list of word32 for the schedule 2015-08-27 10:57:28 +01:00
Camellia add comments and description 2015-05-20 06:07:31 +01:00
DES add comments and description 2015-05-20 06:07:31 +01:00
Types Minor haddock fixes 2015-06-07 13:26:26 +02:00
AES.hs [AES] fix wrongly indented comment 2015-07-19 17:51:00 +01:00
Blowfish.hs add optional support for deepseq 2015-05-22 18:35:46 +01:00
Camellia.hs start cleaning up Camellia 2015-04-09 07:41:15 +01:00
ChaCha.hs add optional support for deepseq 2015-05-22 18:35:46 +01:00
ChaChaPoly1305.hs [ChaChaPoly1305] fix type error of example code 2015-12-03 18:05:04 +00:00
DES.hs move to memory stuff 2015-05-09 14:23:32 +01:00
RC4.hs add optional support for deepseq 2015-05-22 18:35:46 +01:00
Salsa.hs add optional support for deepseq 2015-05-22 18:35:46 +01:00
TripleDES.hs move to memory stuff 2015-05-09 14:23:32 +01:00
Types.hs remove warnings 2015-04-20 06:02:12 +01:00