diff options
author | joe <joe@jerkface.net> | 2016-08-30 04:02:47 -0400 |
---|---|---|
committer | Joe Crayne <joe@jerkface.net> | 2019-07-01 09:19:55 -0400 |
commit | 05e5830aab6b71735f347d8963bd1fb037e59732 (patch) | |
tree | e0ab3f9d098d6a98d55dd3189071a80e592d7b3b | |
parent | 39d8a08aad1d2dd48b807ab867aa17475e4278c4 (diff) |
Added Ord instances
-rw-r--r-- | Data/OpenPGP.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Data/OpenPGP.hs b/Data/OpenPGP.hs index 74aae5f..5d2ab2f 100644 --- a/Data/OpenPGP.hs +++ b/Data/OpenPGP.hs | |||
@@ -769,7 +769,7 @@ data S2K = | |||
769 | SaltedS2K HashAlgorithm Word64 | | 769 | SaltedS2K HashAlgorithm Word64 | |
770 | IteratedSaltedS2K HashAlgorithm Word64 Word32 | | 770 | IteratedSaltedS2K HashAlgorithm Word64 Word32 | |
771 | S2K Word8 B.ByteString | 771 | S2K Word8 B.ByteString |
772 | deriving (Show, Read, Eq) | 772 | deriving (Show, Read, Eq, Ord) |
773 | 773 | ||
774 | instance BINARY_CLASS S2K where | 774 | instance BINARY_CLASS S2K where |
775 | put (SimpleS2K halgo) = put (0::Word8) >> put halgo | 775 | put (SimpleS2K halgo) = put (0::Word8) >> put halgo |
@@ -807,7 +807,7 @@ infiniHashes hsh s = LZ.fromChunks (hs 0) | |||
807 | hs c = hsh (LZ.replicate c 0 `LZ.append` s) : hs (c+1) | 807 | hs c = hsh (LZ.replicate c 0 `LZ.append` s) : hs (c+1) |
808 | 808 | ||
809 | data HashAlgorithm = MD5 | SHA1 | RIPEMD160 | SHA256 | SHA384 | SHA512 | SHA224 | HashAlgorithm Word8 | 809 | data HashAlgorithm = MD5 | SHA1 | RIPEMD160 | SHA256 | SHA384 | SHA512 | SHA224 | HashAlgorithm Word8 |
810 | deriving (Show, Read, Eq) | 810 | deriving (Show, Read, Eq, Ord) |
811 | 811 | ||
812 | instance Enum HashAlgorithm where | 812 | instance Enum HashAlgorithm where |
813 | toEnum 01 = MD5 | 813 | toEnum 01 = MD5 |
@@ -859,7 +859,7 @@ instance BINARY_CLASS KeyAlgorithm where | |||
859 | get = fmap enum_from_word8 get | 859 | get = fmap enum_from_word8 get |
860 | 860 | ||
861 | data SymmetricAlgorithm = Unencrypted | IDEA | TripleDES | CAST5 | Blowfish | AES128 | AES192 | AES256 | Twofish | SymmetricAlgorithm Word8 | 861 | data SymmetricAlgorithm = Unencrypted | IDEA | TripleDES | CAST5 | Blowfish | AES128 | AES192 | AES256 | Twofish | SymmetricAlgorithm Word8 |
862 | deriving (Show, Read, Eq) | 862 | deriving (Show, Read, Eq, Ord) |
863 | 863 | ||
864 | instance Enum SymmetricAlgorithm where | 864 | instance Enum SymmetricAlgorithm where |
865 | toEnum 00 = Unencrypted | 865 | toEnum 00 = Unencrypted |