diff --git a/Crypto/Hash/Blake2b.hs b/Crypto/Hash/Blake2b.hs index 750d540..fdf1e9e 100644 --- a/Crypto/Hash/Blake2b.hs +++ b/Crypto/Hash/Blake2b.hs @@ -16,13 +16,14 @@ module Crypto.Hash.Blake2b import Crypto.Hash.Types import Foreign.Ptr (Ptr) +import Data.Data import Data.Typeable import Data.Word (Word8, Word32) -- | Blake2b (512 bits) cryptographic hash algorithm data Blake2b_512 = Blake2b_512 - deriving (Show,Typeable) + deriving (Show,Data,Typeable) instance HashAlgorithm Blake2b_512 where hashBlockSize _ = 128 diff --git a/Crypto/Hash/Blake2bp.hs b/Crypto/Hash/Blake2bp.hs index 2402903..34cafed 100644 --- a/Crypto/Hash/Blake2bp.hs +++ b/Crypto/Hash/Blake2bp.hs @@ -16,13 +16,14 @@ module Crypto.Hash.Blake2bp import Crypto.Hash.Types import Foreign.Ptr (Ptr) +import Data.Data import Data.Typeable import Data.Word (Word8, Word32) -- | Blake2bp (512 bits) cryptographic hash algorithm data Blake2bp_512 = Blake2bp_512 - deriving (Show,Typeable) + deriving (Show,Data,Typeable) instance HashAlgorithm Blake2bp_512 where hashBlockSize _ = 128 diff --git a/Crypto/Hash/Blake2s.hs b/Crypto/Hash/Blake2s.hs index fb3eae0..845ebf7 100644 --- a/Crypto/Hash/Blake2s.hs +++ b/Crypto/Hash/Blake2s.hs @@ -16,13 +16,14 @@ module Crypto.Hash.Blake2s import Crypto.Hash.Types import Foreign.Ptr (Ptr) +import Data.Data import Data.Typeable import Data.Word (Word8, Word32) -- | Blake2s (224 bits) cryptographic hash algorithm data Blake2s_224 = Blake2s_224 - deriving (Show,Typeable) + deriving (Show,Data,Typeable) instance HashAlgorithm Blake2s_224 where hashBlockSize _ = 64 @@ -34,7 +35,7 @@ instance HashAlgorithm Blake2s_224 where -- | Blake2s (256 bits) cryptographic hash algorithm data Blake2s_256 = Blake2s_256 - deriving (Show,Typeable) + deriving (Show,Data,Typeable) instance HashAlgorithm Blake2s_256 where hashBlockSize _ = 64 diff --git a/Crypto/Hash/Blake2sp.hs b/Crypto/Hash/Blake2sp.hs index 1851724..c274a8f 100644 --- a/Crypto/Hash/Blake2sp.hs +++ b/Crypto/Hash/Blake2sp.hs @@ -16,13 +16,14 @@ module Crypto.Hash.Blake2sp import Crypto.Hash.Types import Foreign.Ptr (Ptr) +import Data.Data import Data.Typeable import Data.Word (Word8, Word32) -- | Blake2sp (224 bits) cryptographic hash algorithm data Blake2sp_224 = Blake2sp_224 - deriving (Show,Typeable) + deriving (Show,Data,Typeable) instance HashAlgorithm Blake2sp_224 where hashBlockSize _ = 64 @@ -34,7 +35,7 @@ instance HashAlgorithm Blake2sp_224 where -- | Blake2sp (256 bits) cryptographic hash algorithm data Blake2sp_256 = Blake2sp_256 - deriving (Show,Typeable) + deriving (Show,Data,Typeable) instance HashAlgorithm Blake2sp_256 where hashBlockSize _ = 64 diff --git a/Crypto/Hash/Keccak.hs b/Crypto/Hash/Keccak.hs index 6c7a0bc..5dcf0e5 100644 --- a/Crypto/Hash/Keccak.hs +++ b/Crypto/Hash/Keccak.hs @@ -16,13 +16,14 @@ module Crypto.Hash.Keccak import Crypto.Hash.Types import Foreign.Ptr (Ptr) +import Data.Data import Data.Typeable import Data.Word (Word8, Word32) -- | Keccak (224 bits) cryptographic hash algorithm data Keccak_224 = Keccak_224 - deriving (Show,Typeable) + deriving (Show,Data,Typeable) instance HashAlgorithm Keccak_224 where hashBlockSize _ = 144 @@ -34,7 +35,7 @@ instance HashAlgorithm Keccak_224 where -- | Keccak (256 bits) cryptographic hash algorithm data Keccak_256 = Keccak_256 - deriving (Show,Typeable) + deriving (Show,Data,Typeable) instance HashAlgorithm Keccak_256 where hashBlockSize _ = 136 @@ -46,7 +47,7 @@ instance HashAlgorithm Keccak_256 where -- | Keccak (384 bits) cryptographic hash algorithm data Keccak_384 = Keccak_384 - deriving (Show,Typeable) + deriving (Show,Data,Typeable) instance HashAlgorithm Keccak_384 where hashBlockSize _ = 104 @@ -58,7 +59,7 @@ instance HashAlgorithm Keccak_384 where -- | Keccak (512 bits) cryptographic hash algorithm data Keccak_512 = Keccak_512 - deriving (Show,Typeable) + deriving (Show,Data,Typeable) instance HashAlgorithm Keccak_512 where hashBlockSize _ = 72 diff --git a/Crypto/Hash/MD2.hs b/Crypto/Hash/MD2.hs index 01128ca..7dd1112 100644 --- a/Crypto/Hash/MD2.hs +++ b/Crypto/Hash/MD2.hs @@ -14,12 +14,13 @@ module Crypto.Hash.MD2 ( MD2 (..) ) where import Crypto.Hash.Types import Foreign.Ptr (Ptr) +import Data.Data import Data.Typeable import Data.Word (Word8, Word32) -- | MD2 cryptographic hash algorithm data MD2 = MD2 - deriving (Show,Typeable) + deriving (Show,Data,Typeable) instance HashAlgorithm MD2 where hashBlockSize _ = 16 diff --git a/Crypto/Hash/MD4.hs b/Crypto/Hash/MD4.hs index 64d34ea..db49187 100644 --- a/Crypto/Hash/MD4.hs +++ b/Crypto/Hash/MD4.hs @@ -14,12 +14,13 @@ module Crypto.Hash.MD4 ( MD4 (..) ) where import Crypto.Hash.Types import Foreign.Ptr (Ptr) +import Data.Data import Data.Typeable import Data.Word (Word8, Word32) -- | MD4 cryptographic hash algorithm data MD4 = MD4 - deriving (Show,Typeable) + deriving (Show,Data,Typeable) instance HashAlgorithm MD4 where hashBlockSize _ = 64 diff --git a/Crypto/Hash/MD5.hs b/Crypto/Hash/MD5.hs index 430f81e..65db6d9 100644 --- a/Crypto/Hash/MD5.hs +++ b/Crypto/Hash/MD5.hs @@ -14,12 +14,13 @@ module Crypto.Hash.MD5 ( MD5 (..) ) where import Crypto.Hash.Types import Foreign.Ptr (Ptr) +import Data.Data import Data.Typeable import Data.Word (Word8, Word32) -- | MD5 cryptographic hash algorithm data MD5 = MD5 - deriving (Show,Typeable) + deriving (Show,Data,Typeable) instance HashAlgorithm MD5 where hashBlockSize _ = 64 diff --git a/Crypto/Hash/RIPEMD160.hs b/Crypto/Hash/RIPEMD160.hs index f2689cd..00071db 100644 --- a/Crypto/Hash/RIPEMD160.hs +++ b/Crypto/Hash/RIPEMD160.hs @@ -14,12 +14,13 @@ module Crypto.Hash.RIPEMD160 ( RIPEMD160 (..) ) where import Crypto.Hash.Types import Foreign.Ptr (Ptr) +import Data.Data import Data.Typeable import Data.Word (Word8, Word32) -- | RIPEMD160 cryptographic hash algorithm data RIPEMD160 = RIPEMD160 - deriving (Show,Typeable) + deriving (Show,Data,Typeable) instance HashAlgorithm RIPEMD160 where hashBlockSize _ = 64 diff --git a/Crypto/Hash/SHA1.hs b/Crypto/Hash/SHA1.hs index 9720fb2..749fc32 100644 --- a/Crypto/Hash/SHA1.hs +++ b/Crypto/Hash/SHA1.hs @@ -14,12 +14,13 @@ module Crypto.Hash.SHA1 ( SHA1 (..) ) where import Crypto.Hash.Types import Foreign.Ptr (Ptr) +import Data.Data import Data.Typeable import Data.Word (Word8, Word32) -- | SHA1 cryptographic hash algorithm data SHA1 = SHA1 - deriving (Show,Typeable) + deriving (Show,Data,Typeable) instance HashAlgorithm SHA1 where hashBlockSize _ = 64 diff --git a/Crypto/Hash/SHA224.hs b/Crypto/Hash/SHA224.hs index c7a10d9..66d1b2f 100644 --- a/Crypto/Hash/SHA224.hs +++ b/Crypto/Hash/SHA224.hs @@ -14,12 +14,13 @@ module Crypto.Hash.SHA224 ( SHA224 (..) ) where import Crypto.Hash.Types import Foreign.Ptr (Ptr) +import Data.Data import Data.Typeable import Data.Word (Word8, Word32) -- | SHA224 cryptographic hash algorithm data SHA224 = SHA224 - deriving (Show,Typeable) + deriving (Show,Data,Typeable) instance HashAlgorithm SHA224 where hashBlockSize _ = 64 diff --git a/Crypto/Hash/SHA256.hs b/Crypto/Hash/SHA256.hs index 54751e1..53223af 100644 --- a/Crypto/Hash/SHA256.hs +++ b/Crypto/Hash/SHA256.hs @@ -14,12 +14,13 @@ module Crypto.Hash.SHA256 ( SHA256 (..) ) where import Crypto.Hash.Types import Foreign.Ptr (Ptr) +import Data.Data import Data.Typeable import Data.Word (Word8, Word32) -- | SHA256 cryptographic hash algorithm data SHA256 = SHA256 - deriving (Show,Typeable) + deriving (Show,Data,Typeable) instance HashAlgorithm SHA256 where hashBlockSize _ = 64 diff --git a/Crypto/Hash/SHA3.hs b/Crypto/Hash/SHA3.hs index c49c8fc..c43b01c 100644 --- a/Crypto/Hash/SHA3.hs +++ b/Crypto/Hash/SHA3.hs @@ -16,13 +16,14 @@ module Crypto.Hash.SHA3 import Crypto.Hash.Types import Foreign.Ptr (Ptr) +import Data.Data import Data.Typeable import Data.Word (Word8, Word32) -- | SHA3 (224 bits) cryptographic hash algorithm data SHA3_224 = SHA3_224 - deriving (Show,Typeable) + deriving (Show,Data,Typeable) instance HashAlgorithm SHA3_224 where hashBlockSize _ = 144 @@ -34,7 +35,7 @@ instance HashAlgorithm SHA3_224 where -- | SHA3 (256 bits) cryptographic hash algorithm data SHA3_256 = SHA3_256 - deriving (Show,Typeable) + deriving (Show,Data,Typeable) instance HashAlgorithm SHA3_256 where hashBlockSize _ = 136 @@ -46,7 +47,7 @@ instance HashAlgorithm SHA3_256 where -- | SHA3 (384 bits) cryptographic hash algorithm data SHA3_384 = SHA3_384 - deriving (Show,Typeable) + deriving (Show,Data,Typeable) instance HashAlgorithm SHA3_384 where hashBlockSize _ = 104 @@ -58,7 +59,7 @@ instance HashAlgorithm SHA3_384 where -- | SHA3 (512 bits) cryptographic hash algorithm data SHA3_512 = SHA3_512 - deriving (Show,Typeable) + deriving (Show,Data,Typeable) instance HashAlgorithm SHA3_512 where hashBlockSize _ = 72 diff --git a/Crypto/Hash/SHA384.hs b/Crypto/Hash/SHA384.hs index 6d974bb..a314108 100644 --- a/Crypto/Hash/SHA384.hs +++ b/Crypto/Hash/SHA384.hs @@ -14,12 +14,13 @@ module Crypto.Hash.SHA384 ( SHA384 (..) ) where import Crypto.Hash.Types import Foreign.Ptr (Ptr) +import Data.Data import Data.Typeable import Data.Word (Word8, Word32) -- | SHA384 cryptographic hash algorithm data SHA384 = SHA384 - deriving (Show,Typeable) + deriving (Show,Data,Typeable) instance HashAlgorithm SHA384 where hashBlockSize _ = 128 diff --git a/Crypto/Hash/SHA512.hs b/Crypto/Hash/SHA512.hs index 4abe3a2..84c2db3 100644 --- a/Crypto/Hash/SHA512.hs +++ b/Crypto/Hash/SHA512.hs @@ -14,12 +14,13 @@ module Crypto.Hash.SHA512 ( SHA512 (..) ) where import Crypto.Hash.Types import Foreign.Ptr (Ptr) +import Data.Data import Data.Typeable import Data.Word (Word8, Word32) -- | SHA512 cryptographic hash algorithm data SHA512 = SHA512 - deriving (Show,Typeable) + deriving (Show,Data,Typeable) instance HashAlgorithm SHA512 where hashBlockSize _ = 128 diff --git a/Crypto/Hash/SHA512t.hs b/Crypto/Hash/SHA512t.hs index aa2862a..6992a5f 100644 --- a/Crypto/Hash/SHA512t.hs +++ b/Crypto/Hash/SHA512t.hs @@ -16,13 +16,14 @@ module Crypto.Hash.SHA512t import Crypto.Hash.Types import Foreign.Ptr (Ptr) +import Data.Data import Data.Typeable import Data.Word (Word8, Word32) -- | SHA512t (224 bits) cryptographic hash algorithm data SHA512t_224 = SHA512t_224 - deriving (Show,Typeable) + deriving (Show,Data,Typeable) instance HashAlgorithm SHA512t_224 where hashBlockSize _ = 128 @@ -34,7 +35,7 @@ instance HashAlgorithm SHA512t_224 where -- | SHA512t (256 bits) cryptographic hash algorithm data SHA512t_256 = SHA512t_256 - deriving (Show,Typeable) + deriving (Show,Data,Typeable) instance HashAlgorithm SHA512t_256 where hashBlockSize _ = 128 diff --git a/Crypto/Hash/Skein256.hs b/Crypto/Hash/Skein256.hs index b40002a..c5bc048 100644 --- a/Crypto/Hash/Skein256.hs +++ b/Crypto/Hash/Skein256.hs @@ -16,13 +16,14 @@ module Crypto.Hash.Skein256 import Crypto.Hash.Types import Foreign.Ptr (Ptr) +import Data.Data import Data.Typeable import Data.Word (Word8, Word32) -- | Skein256 (224 bits) cryptographic hash algorithm data Skein256_224 = Skein256_224 - deriving (Show,Typeable) + deriving (Show,Data,Typeable) instance HashAlgorithm Skein256_224 where hashBlockSize _ = 32 @@ -34,7 +35,7 @@ instance HashAlgorithm Skein256_224 where -- | Skein256 (256 bits) cryptographic hash algorithm data Skein256_256 = Skein256_256 - deriving (Show,Typeable) + deriving (Show,Data,Typeable) instance HashAlgorithm Skein256_256 where hashBlockSize _ = 32 diff --git a/Crypto/Hash/Skein512.hs b/Crypto/Hash/Skein512.hs index 06e31be..72833fd 100644 --- a/Crypto/Hash/Skein512.hs +++ b/Crypto/Hash/Skein512.hs @@ -16,13 +16,14 @@ module Crypto.Hash.Skein512 import Crypto.Hash.Types import Foreign.Ptr (Ptr) +import Data.Data import Data.Typeable import Data.Word (Word8, Word32) -- | Skein512 (224 bits) cryptographic hash algorithm data Skein512_224 = Skein512_224 - deriving (Show,Typeable) + deriving (Show,Data,Typeable) instance HashAlgorithm Skein512_224 where hashBlockSize _ = 64 @@ -34,7 +35,7 @@ instance HashAlgorithm Skein512_224 where -- | Skein512 (256 bits) cryptographic hash algorithm data Skein512_256 = Skein512_256 - deriving (Show,Typeable) + deriving (Show,Data,Typeable) instance HashAlgorithm Skein512_256 where hashBlockSize _ = 64 @@ -46,7 +47,7 @@ instance HashAlgorithm Skein512_256 where -- | Skein512 (384 bits) cryptographic hash algorithm data Skein512_384 = Skein512_384 - deriving (Show,Typeable) + deriving (Show,Data,Typeable) instance HashAlgorithm Skein512_384 where hashBlockSize _ = 64 @@ -58,7 +59,7 @@ instance HashAlgorithm Skein512_384 where -- | Skein512 (512 bits) cryptographic hash algorithm data Skein512_512 = Skein512_512 - deriving (Show,Typeable) + deriving (Show,Data,Typeable) instance HashAlgorithm Skein512_512 where hashBlockSize _ = 64 diff --git a/Crypto/Hash/Tiger.hs b/Crypto/Hash/Tiger.hs index 6381662..dcb9d5c 100644 --- a/Crypto/Hash/Tiger.hs +++ b/Crypto/Hash/Tiger.hs @@ -14,12 +14,13 @@ module Crypto.Hash.Tiger ( Tiger (..) ) where import Crypto.Hash.Types import Foreign.Ptr (Ptr) +import Data.Data import Data.Typeable import Data.Word (Word8, Word32) -- | Tiger cryptographic hash algorithm data Tiger = Tiger - deriving (Show,Typeable) + deriving (Show,Data,Typeable) instance HashAlgorithm Tiger where hashBlockSize _ = 64 diff --git a/Crypto/Hash/Whirlpool.hs b/Crypto/Hash/Whirlpool.hs index 9af665b..9acb8c1 100644 --- a/Crypto/Hash/Whirlpool.hs +++ b/Crypto/Hash/Whirlpool.hs @@ -14,12 +14,13 @@ module Crypto.Hash.Whirlpool ( Whirlpool (..) ) where import Crypto.Hash.Types import Foreign.Ptr (Ptr) +import Data.Data import Data.Typeable import Data.Word (Word8, Word32) -- | Whirlpool cryptographic hash algorithm data Whirlpool = Whirlpool - deriving (Show,Typeable) + deriving (Show,Data,Typeable) instance HashAlgorithm Whirlpool where hashBlockSize _ = 64 diff --git a/gen/template/hash-len.hs b/gen/template/hash-len.hs index ecdd591..bb9778f 100644 --- a/gen/template/hash-len.hs +++ b/gen/template/hash-len.hs @@ -16,13 +16,14 @@ module Crypto.Hash.%%MODULENAME%% import Crypto.Hash.Types import Foreign.Ptr (Ptr) +import Data.Data import Data.Typeable import Data.Word (Word8, Word32) %{CUSTOMIZABLE%} -- | %%MODULENAME%% (%%CUSTOM_BITSIZE%% bits) cryptographic hash algorithm data %%MODULENAME%%_%%CUSTOM_BITSIZE%% = %%MODULENAME%%_%%CUSTOM_BITSIZE%% - deriving (Show,Typeable) + deriving (Show,Data,Typeable) instance HashAlgorithm %%MODULENAME%%_%%CUSTOM_BITSIZE%% where hashBlockSize _ = %%CUSTOM_BLOCK_SIZE_BYTES%% diff --git a/gen/template/hash.hs b/gen/template/hash.hs index 673a11d..a4c4138 100644 --- a/gen/template/hash.hs +++ b/gen/template/hash.hs @@ -14,12 +14,13 @@ module Crypto.Hash.%%MODULENAME%% ( %%MODULENAME%% (..) ) where import Crypto.Hash.Types import Foreign.Ptr (Ptr) +import Data.Data import Data.Typeable import Data.Word (Word8, Word32) -- | %%MODULENAME%% cryptographic hash algorithm data %%MODULENAME%% = %%MODULENAME%% - deriving (Show,Typeable) + deriving (Show,Data,Typeable) instance HashAlgorithm %%MODULENAME%% where hashBlockSize _ = %%BLOCK_SIZE_BYTES%%