diff --git a/Crypto/Hash/Blake2b.hs b/Crypto/Hash/Blake2b.hs index 7ef8515..750d540 100644 --- a/Crypto/Hash/Blake2b.hs +++ b/Crypto/Hash/Blake2b.hs @@ -9,18 +9,20 @@ -- Blake2b cryptographic hash. -- {-# LANGUAGE ForeignFunctionInterface #-} +{-# LANGUAGE DeriveDataTypeable #-} module Crypto.Hash.Blake2b ( Blake2b_512 (..) ) where import Crypto.Hash.Types import Foreign.Ptr (Ptr) +import Data.Typeable import Data.Word (Word8, Word32) -- | Blake2b (512 bits) cryptographic hash algorithm data Blake2b_512 = Blake2b_512 - deriving (Show) + deriving (Show,Typeable) instance HashAlgorithm Blake2b_512 where hashBlockSize _ = 128 diff --git a/Crypto/Hash/Blake2bp.hs b/Crypto/Hash/Blake2bp.hs index 395c532..2402903 100644 --- a/Crypto/Hash/Blake2bp.hs +++ b/Crypto/Hash/Blake2bp.hs @@ -9,18 +9,20 @@ -- Blake2bp cryptographic hash. -- {-# LANGUAGE ForeignFunctionInterface #-} +{-# LANGUAGE DeriveDataTypeable #-} module Crypto.Hash.Blake2bp ( Blake2bp_512 (..) ) where import Crypto.Hash.Types import Foreign.Ptr (Ptr) +import Data.Typeable import Data.Word (Word8, Word32) -- | Blake2bp (512 bits) cryptographic hash algorithm data Blake2bp_512 = Blake2bp_512 - deriving (Show) + deriving (Show,Typeable) instance HashAlgorithm Blake2bp_512 where hashBlockSize _ = 128 diff --git a/Crypto/Hash/Blake2s.hs b/Crypto/Hash/Blake2s.hs index d5c45f7..fb3eae0 100644 --- a/Crypto/Hash/Blake2s.hs +++ b/Crypto/Hash/Blake2s.hs @@ -9,18 +9,20 @@ -- Blake2s cryptographic hash. -- {-# LANGUAGE ForeignFunctionInterface #-} +{-# LANGUAGE DeriveDataTypeable #-} module Crypto.Hash.Blake2s ( Blake2s_224 (..), Blake2s_256 (..) ) where import Crypto.Hash.Types import Foreign.Ptr (Ptr) +import Data.Typeable import Data.Word (Word8, Word32) -- | Blake2s (224 bits) cryptographic hash algorithm data Blake2s_224 = Blake2s_224 - deriving (Show) + deriving (Show,Typeable) instance HashAlgorithm Blake2s_224 where hashBlockSize _ = 64 @@ -32,7 +34,7 @@ instance HashAlgorithm Blake2s_224 where -- | Blake2s (256 bits) cryptographic hash algorithm data Blake2s_256 = Blake2s_256 - deriving (Show) + deriving (Show,Typeable) instance HashAlgorithm Blake2s_256 where hashBlockSize _ = 64 diff --git a/Crypto/Hash/Blake2sp.hs b/Crypto/Hash/Blake2sp.hs index a7f54c8..1851724 100644 --- a/Crypto/Hash/Blake2sp.hs +++ b/Crypto/Hash/Blake2sp.hs @@ -9,18 +9,20 @@ -- Blake2sp cryptographic hash. -- {-# LANGUAGE ForeignFunctionInterface #-} +{-# LANGUAGE DeriveDataTypeable #-} module Crypto.Hash.Blake2sp ( Blake2sp_224 (..), Blake2sp_256 (..) ) where import Crypto.Hash.Types import Foreign.Ptr (Ptr) +import Data.Typeable import Data.Word (Word8, Word32) -- | Blake2sp (224 bits) cryptographic hash algorithm data Blake2sp_224 = Blake2sp_224 - deriving (Show) + deriving (Show,Typeable) instance HashAlgorithm Blake2sp_224 where hashBlockSize _ = 64 @@ -32,7 +34,7 @@ instance HashAlgorithm Blake2sp_224 where -- | Blake2sp (256 bits) cryptographic hash algorithm data Blake2sp_256 = Blake2sp_256 - deriving (Show) + deriving (Show,Typeable) instance HashAlgorithm Blake2sp_256 where hashBlockSize _ = 64 diff --git a/Crypto/Hash/Keccak.hs b/Crypto/Hash/Keccak.hs index f632169..6c7a0bc 100644 --- a/Crypto/Hash/Keccak.hs +++ b/Crypto/Hash/Keccak.hs @@ -9,18 +9,20 @@ -- Keccak cryptographic hash. -- {-# LANGUAGE ForeignFunctionInterface #-} +{-# LANGUAGE DeriveDataTypeable #-} module Crypto.Hash.Keccak ( Keccak_224 (..), Keccak_256 (..), Keccak_384 (..), Keccak_512 (..) ) where import Crypto.Hash.Types import Foreign.Ptr (Ptr) +import Data.Typeable import Data.Word (Word8, Word32) -- | Keccak (224 bits) cryptographic hash algorithm data Keccak_224 = Keccak_224 - deriving (Show) + deriving (Show,Typeable) instance HashAlgorithm Keccak_224 where hashBlockSize _ = 144 @@ -32,7 +34,7 @@ instance HashAlgorithm Keccak_224 where -- | Keccak (256 bits) cryptographic hash algorithm data Keccak_256 = Keccak_256 - deriving (Show) + deriving (Show,Typeable) instance HashAlgorithm Keccak_256 where hashBlockSize _ = 136 @@ -44,7 +46,7 @@ instance HashAlgorithm Keccak_256 where -- | Keccak (384 bits) cryptographic hash algorithm data Keccak_384 = Keccak_384 - deriving (Show) + deriving (Show,Typeable) instance HashAlgorithm Keccak_384 where hashBlockSize _ = 104 @@ -56,7 +58,7 @@ instance HashAlgorithm Keccak_384 where -- | Keccak (512 bits) cryptographic hash algorithm data Keccak_512 = Keccak_512 - deriving (Show) + deriving (Show,Typeable) instance HashAlgorithm Keccak_512 where hashBlockSize _ = 72 diff --git a/Crypto/Hash/MD2.hs b/Crypto/Hash/MD2.hs index 9de866b..01128ca 100644 --- a/Crypto/Hash/MD2.hs +++ b/Crypto/Hash/MD2.hs @@ -9,15 +9,17 @@ -- MD2 cryptographic hash. -- {-# LANGUAGE ForeignFunctionInterface #-} +{-# LANGUAGE DeriveDataTypeable #-} module Crypto.Hash.MD2 ( MD2 (..) ) where import Crypto.Hash.Types import Foreign.Ptr (Ptr) +import Data.Typeable import Data.Word (Word8, Word32) -- | MD2 cryptographic hash algorithm data MD2 = MD2 - deriving (Show) + deriving (Show,Typeable) instance HashAlgorithm MD2 where hashBlockSize _ = 16 diff --git a/Crypto/Hash/MD4.hs b/Crypto/Hash/MD4.hs index 3a089c7..64d34ea 100644 --- a/Crypto/Hash/MD4.hs +++ b/Crypto/Hash/MD4.hs @@ -9,15 +9,17 @@ -- MD4 cryptographic hash. -- {-# LANGUAGE ForeignFunctionInterface #-} +{-# LANGUAGE DeriveDataTypeable #-} module Crypto.Hash.MD4 ( MD4 (..) ) where import Crypto.Hash.Types import Foreign.Ptr (Ptr) +import Data.Typeable import Data.Word (Word8, Word32) -- | MD4 cryptographic hash algorithm data MD4 = MD4 - deriving (Show) + deriving (Show,Typeable) instance HashAlgorithm MD4 where hashBlockSize _ = 64 diff --git a/Crypto/Hash/MD5.hs b/Crypto/Hash/MD5.hs index 0148fe8..430f81e 100644 --- a/Crypto/Hash/MD5.hs +++ b/Crypto/Hash/MD5.hs @@ -9,15 +9,17 @@ -- MD5 cryptographic hash. -- {-# LANGUAGE ForeignFunctionInterface #-} +{-# LANGUAGE DeriveDataTypeable #-} module Crypto.Hash.MD5 ( MD5 (..) ) where import Crypto.Hash.Types import Foreign.Ptr (Ptr) +import Data.Typeable import Data.Word (Word8, Word32) -- | MD5 cryptographic hash algorithm data MD5 = MD5 - deriving (Show) + deriving (Show,Typeable) instance HashAlgorithm MD5 where hashBlockSize _ = 64 diff --git a/Crypto/Hash/RIPEMD160.hs b/Crypto/Hash/RIPEMD160.hs index d9a3f0e..f2689cd 100644 --- a/Crypto/Hash/RIPEMD160.hs +++ b/Crypto/Hash/RIPEMD160.hs @@ -9,15 +9,17 @@ -- RIPEMD160 cryptographic hash. -- {-# LANGUAGE ForeignFunctionInterface #-} +{-# LANGUAGE DeriveDataTypeable #-} module Crypto.Hash.RIPEMD160 ( RIPEMD160 (..) ) where import Crypto.Hash.Types import Foreign.Ptr (Ptr) +import Data.Typeable import Data.Word (Word8, Word32) -- | RIPEMD160 cryptographic hash algorithm data RIPEMD160 = RIPEMD160 - deriving (Show) + deriving (Show,Typeable) instance HashAlgorithm RIPEMD160 where hashBlockSize _ = 64 diff --git a/Crypto/Hash/SHA1.hs b/Crypto/Hash/SHA1.hs index 19348be..9720fb2 100644 --- a/Crypto/Hash/SHA1.hs +++ b/Crypto/Hash/SHA1.hs @@ -9,15 +9,17 @@ -- SHA1 cryptographic hash. -- {-# LANGUAGE ForeignFunctionInterface #-} +{-# LANGUAGE DeriveDataTypeable #-} module Crypto.Hash.SHA1 ( SHA1 (..) ) where import Crypto.Hash.Types import Foreign.Ptr (Ptr) +import Data.Typeable import Data.Word (Word8, Word32) -- | SHA1 cryptographic hash algorithm data SHA1 = SHA1 - deriving (Show) + deriving (Show,Typeable) instance HashAlgorithm SHA1 where hashBlockSize _ = 64 diff --git a/Crypto/Hash/SHA224.hs b/Crypto/Hash/SHA224.hs index 652af92..c7a10d9 100644 --- a/Crypto/Hash/SHA224.hs +++ b/Crypto/Hash/SHA224.hs @@ -9,15 +9,17 @@ -- SHA224 cryptographic hash. -- {-# LANGUAGE ForeignFunctionInterface #-} +{-# LANGUAGE DeriveDataTypeable #-} module Crypto.Hash.SHA224 ( SHA224 (..) ) where import Crypto.Hash.Types import Foreign.Ptr (Ptr) +import Data.Typeable import Data.Word (Word8, Word32) -- | SHA224 cryptographic hash algorithm data SHA224 = SHA224 - deriving (Show) + deriving (Show,Typeable) instance HashAlgorithm SHA224 where hashBlockSize _ = 64 diff --git a/Crypto/Hash/SHA256.hs b/Crypto/Hash/SHA256.hs index 11bd2a0..54751e1 100644 --- a/Crypto/Hash/SHA256.hs +++ b/Crypto/Hash/SHA256.hs @@ -9,15 +9,17 @@ -- SHA256 cryptographic hash. -- {-# LANGUAGE ForeignFunctionInterface #-} +{-# LANGUAGE DeriveDataTypeable #-} module Crypto.Hash.SHA256 ( SHA256 (..) ) where import Crypto.Hash.Types import Foreign.Ptr (Ptr) +import Data.Typeable import Data.Word (Word8, Word32) -- | SHA256 cryptographic hash algorithm data SHA256 = SHA256 - deriving (Show) + deriving (Show,Typeable) instance HashAlgorithm SHA256 where hashBlockSize _ = 64 diff --git a/Crypto/Hash/SHA3.hs b/Crypto/Hash/SHA3.hs index f070dc9..c49c8fc 100644 --- a/Crypto/Hash/SHA3.hs +++ b/Crypto/Hash/SHA3.hs @@ -9,18 +9,20 @@ -- SHA3 cryptographic hash. -- {-# LANGUAGE ForeignFunctionInterface #-} +{-# LANGUAGE DeriveDataTypeable #-} module Crypto.Hash.SHA3 ( SHA3_224 (..), SHA3_256 (..), SHA3_384 (..), SHA3_512 (..) ) where import Crypto.Hash.Types import Foreign.Ptr (Ptr) +import Data.Typeable import Data.Word (Word8, Word32) -- | SHA3 (224 bits) cryptographic hash algorithm data SHA3_224 = SHA3_224 - deriving (Show) + deriving (Show,Typeable) instance HashAlgorithm SHA3_224 where hashBlockSize _ = 144 @@ -32,7 +34,7 @@ instance HashAlgorithm SHA3_224 where -- | SHA3 (256 bits) cryptographic hash algorithm data SHA3_256 = SHA3_256 - deriving (Show) + deriving (Show,Typeable) instance HashAlgorithm SHA3_256 where hashBlockSize _ = 136 @@ -44,7 +46,7 @@ instance HashAlgorithm SHA3_256 where -- | SHA3 (384 bits) cryptographic hash algorithm data SHA3_384 = SHA3_384 - deriving (Show) + deriving (Show,Typeable) instance HashAlgorithm SHA3_384 where hashBlockSize _ = 104 @@ -56,7 +58,7 @@ instance HashAlgorithm SHA3_384 where -- | SHA3 (512 bits) cryptographic hash algorithm data SHA3_512 = SHA3_512 - deriving (Show) + deriving (Show,Typeable) instance HashAlgorithm SHA3_512 where hashBlockSize _ = 72 diff --git a/Crypto/Hash/SHA384.hs b/Crypto/Hash/SHA384.hs index 6c20dd7..6d974bb 100644 --- a/Crypto/Hash/SHA384.hs +++ b/Crypto/Hash/SHA384.hs @@ -9,15 +9,17 @@ -- SHA384 cryptographic hash. -- {-# LANGUAGE ForeignFunctionInterface #-} +{-# LANGUAGE DeriveDataTypeable #-} module Crypto.Hash.SHA384 ( SHA384 (..) ) where import Crypto.Hash.Types import Foreign.Ptr (Ptr) +import Data.Typeable import Data.Word (Word8, Word32) -- | SHA384 cryptographic hash algorithm data SHA384 = SHA384 - deriving (Show) + deriving (Show,Typeable) instance HashAlgorithm SHA384 where hashBlockSize _ = 128 diff --git a/Crypto/Hash/SHA512.hs b/Crypto/Hash/SHA512.hs index fd4305b..4abe3a2 100644 --- a/Crypto/Hash/SHA512.hs +++ b/Crypto/Hash/SHA512.hs @@ -9,15 +9,17 @@ -- SHA512 cryptographic hash. -- {-# LANGUAGE ForeignFunctionInterface #-} +{-# LANGUAGE DeriveDataTypeable #-} module Crypto.Hash.SHA512 ( SHA512 (..) ) where import Crypto.Hash.Types import Foreign.Ptr (Ptr) +import Data.Typeable import Data.Word (Word8, Word32) -- | SHA512 cryptographic hash algorithm data SHA512 = SHA512 - deriving (Show) + deriving (Show,Typeable) instance HashAlgorithm SHA512 where hashBlockSize _ = 128 diff --git a/Crypto/Hash/SHA512t.hs b/Crypto/Hash/SHA512t.hs index 685343f..aa2862a 100644 --- a/Crypto/Hash/SHA512t.hs +++ b/Crypto/Hash/SHA512t.hs @@ -9,18 +9,20 @@ -- SHA512t cryptographic hash. -- {-# LANGUAGE ForeignFunctionInterface #-} +{-# LANGUAGE DeriveDataTypeable #-} module Crypto.Hash.SHA512t ( SHA512t_224 (..), SHA512t_256 (..) ) where import Crypto.Hash.Types import Foreign.Ptr (Ptr) +import Data.Typeable import Data.Word (Word8, Word32) -- | SHA512t (224 bits) cryptographic hash algorithm data SHA512t_224 = SHA512t_224 - deriving (Show) + deriving (Show,Typeable) instance HashAlgorithm SHA512t_224 where hashBlockSize _ = 128 @@ -32,7 +34,7 @@ instance HashAlgorithm SHA512t_224 where -- | SHA512t (256 bits) cryptographic hash algorithm data SHA512t_256 = SHA512t_256 - deriving (Show) + deriving (Show,Typeable) instance HashAlgorithm SHA512t_256 where hashBlockSize _ = 128 diff --git a/Crypto/Hash/Skein256.hs b/Crypto/Hash/Skein256.hs index 883b0f7..b40002a 100644 --- a/Crypto/Hash/Skein256.hs +++ b/Crypto/Hash/Skein256.hs @@ -9,18 +9,20 @@ -- Skein256 cryptographic hash. -- {-# LANGUAGE ForeignFunctionInterface #-} +{-# LANGUAGE DeriveDataTypeable #-} module Crypto.Hash.Skein256 ( Skein256_224 (..), Skein256_256 (..) ) where import Crypto.Hash.Types import Foreign.Ptr (Ptr) +import Data.Typeable import Data.Word (Word8, Word32) -- | Skein256 (224 bits) cryptographic hash algorithm data Skein256_224 = Skein256_224 - deriving (Show) + deriving (Show,Typeable) instance HashAlgorithm Skein256_224 where hashBlockSize _ = 32 @@ -32,7 +34,7 @@ instance HashAlgorithm Skein256_224 where -- | Skein256 (256 bits) cryptographic hash algorithm data Skein256_256 = Skein256_256 - deriving (Show) + deriving (Show,Typeable) instance HashAlgorithm Skein256_256 where hashBlockSize _ = 32 diff --git a/Crypto/Hash/Skein512.hs b/Crypto/Hash/Skein512.hs index de2367d..06e31be 100644 --- a/Crypto/Hash/Skein512.hs +++ b/Crypto/Hash/Skein512.hs @@ -9,18 +9,20 @@ -- Skein512 cryptographic hash. -- {-# LANGUAGE ForeignFunctionInterface #-} +{-# LANGUAGE DeriveDataTypeable #-} module Crypto.Hash.Skein512 ( Skein512_224 (..), Skein512_256 (..), Skein512_384 (..), Skein512_512 (..) ) where import Crypto.Hash.Types import Foreign.Ptr (Ptr) +import Data.Typeable import Data.Word (Word8, Word32) -- | Skein512 (224 bits) cryptographic hash algorithm data Skein512_224 = Skein512_224 - deriving (Show) + deriving (Show,Typeable) instance HashAlgorithm Skein512_224 where hashBlockSize _ = 64 @@ -32,7 +34,7 @@ instance HashAlgorithm Skein512_224 where -- | Skein512 (256 bits) cryptographic hash algorithm data Skein512_256 = Skein512_256 - deriving (Show) + deriving (Show,Typeable) instance HashAlgorithm Skein512_256 where hashBlockSize _ = 64 @@ -44,7 +46,7 @@ instance HashAlgorithm Skein512_256 where -- | Skein512 (384 bits) cryptographic hash algorithm data Skein512_384 = Skein512_384 - deriving (Show) + deriving (Show,Typeable) instance HashAlgorithm Skein512_384 where hashBlockSize _ = 64 @@ -56,7 +58,7 @@ instance HashAlgorithm Skein512_384 where -- | Skein512 (512 bits) cryptographic hash algorithm data Skein512_512 = Skein512_512 - deriving (Show) + deriving (Show,Typeable) instance HashAlgorithm Skein512_512 where hashBlockSize _ = 64 diff --git a/Crypto/Hash/Tiger.hs b/Crypto/Hash/Tiger.hs index 35e14ee..6381662 100644 --- a/Crypto/Hash/Tiger.hs +++ b/Crypto/Hash/Tiger.hs @@ -9,15 +9,17 @@ -- Tiger cryptographic hash. -- {-# LANGUAGE ForeignFunctionInterface #-} +{-# LANGUAGE DeriveDataTypeable #-} module Crypto.Hash.Tiger ( Tiger (..) ) where import Crypto.Hash.Types import Foreign.Ptr (Ptr) +import Data.Typeable import Data.Word (Word8, Word32) -- | Tiger cryptographic hash algorithm data Tiger = Tiger - deriving (Show) + deriving (Show,Typeable) instance HashAlgorithm Tiger where hashBlockSize _ = 64 diff --git a/Crypto/Hash/Whirlpool.hs b/Crypto/Hash/Whirlpool.hs index 07bb2cb..9af665b 100644 --- a/Crypto/Hash/Whirlpool.hs +++ b/Crypto/Hash/Whirlpool.hs @@ -9,15 +9,17 @@ -- Whirlpool cryptographic hash. -- {-# LANGUAGE ForeignFunctionInterface #-} +{-# LANGUAGE DeriveDataTypeable #-} module Crypto.Hash.Whirlpool ( Whirlpool (..) ) where import Crypto.Hash.Types import Foreign.Ptr (Ptr) +import Data.Typeable import Data.Word (Word8, Word32) -- | Whirlpool cryptographic hash algorithm data Whirlpool = Whirlpool - deriving (Show) + deriving (Show,Typeable) instance HashAlgorithm Whirlpool where hashBlockSize _ = 64