{-# LANGUAGE DeriveDataTypeable #-}
module Crypto.Types where
import qualified Control.Exception as X
import Data.Data
import Data.Typeable
import Data.ByteString as B
import Data.ByteString.Lazy as L
data IV k = IV { initializationVector :: {-# UNPACK #-} !B.ByteString
} deriving (Eq, Ord, Show)
type BitLength = Int
type ByteLength = Int
data BlockCipherError = InputTooLong String
| AuthenticationFailed String
| Other String
deriving (Eq, Ord, Show, Read, Data, Typeable)
instance X.Exception BlockCipherError