From 839cd5036e0d2d404bc1975f18b81eda358c1e44 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Sun, 7 Aug 2011 16:43:04 -0500 Subject: put for HashAlgorithm --- lib/OpenPGP.hs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/OpenPGP.hs') diff --git a/lib/OpenPGP.hs b/lib/OpenPGP.hs index 13ffe10..f9789a2 100644 --- a/lib/OpenPGP.hs +++ b/lib/OpenPGP.hs @@ -282,6 +282,13 @@ fingerprint_material p | version p == 2 || version p == 3 = [n, e] data HashAlgorithm = MD5 | SHA1 | RIPEMD160 | SHA256 | SHA384 | SHA512 | SHA224 deriving (Show, Read, Eq) instance Binary HashAlgorithm where + put MD5 = put (01 :: Word8) + put SHA1 = put (02 :: Word8) + put RIPEMD160 = put (03 :: Word8) + put SHA256 = put (08 :: Word8) + put SHA384 = put (09 :: Word8) + put SHA512 = put (10 :: Word8) + put SHA224 = put (11 :: Word8) get = do tag <- get :: Get Word8 case tag of -- cgit v1.2.3