| 1 |
{-# LANGUAGE CPP #-} |
| 2 |
{-| |
| 3 |
Maintainer: [email protected] |
| 4 |
Stability: beta |
| 5 |
Portability: portable |
| 6 |
Authors: Thomas DuBuisson |
| 7 |
|
| 8 |
|
| 9 |
Generic mode implementations useable by any correct BlockCipher |
| 10 |
instance Be aware there are no tests for CFB mode yet. See |
| 11 |
'Test.Crypto'. |
| 12 |
-} |
| 13 |
module Crypto.Modes where |
| 14 |
import {-# SOURCE #-} Crypto.Classes |
| 15 |
import Crypto.Types |
| 16 |
import Data.ByteString as B |
| 17 |
import Data.ByteString.Lazy as L |
| 18 |
dblIV :: BlockCipher k => IV k -> IV k |
| 19 |
cbcMac' :: BlockCipher k => k -> B.ByteString -> B.ByteString |
| 20 |
cbcMac :: BlockCipher k => k -> L.ByteString -> L.ByteString |
| 21 |
cMac :: BlockCipher k => k -> L.ByteString -> L.ByteString |
| 22 |
cMac' :: BlockCipher k => k -> B.ByteString -> B.ByteString |
| 23 |
cMacStar :: BlockCipher k => k -> [L.ByteString] -> L.ByteString |
| 24 |
cMacStar' :: BlockCipher k => k -> [B.ByteString] -> B.ByteString |