diff options
author | Stephen Paul Weber <singpolyma@singpolyma.net> | 2011-08-07 16:43:04 -0500 |
---|---|---|
committer | Stephen Paul Weber <singpolyma@singpolyma.net> | 2011-08-07 16:43:04 -0500 |
commit | 839cd5036e0d2d404bc1975f18b81eda358c1e44 (patch) | |
tree | a0092c6968073ee78befd72cecf4dcc36becf580 /lib/OpenPGP.hs | |
parent | 128949c8b683b72ed40e006fb569c84654a6a268 (diff) |
put for HashAlgorithm
Diffstat (limited to 'lib/OpenPGP.hs')
-rw-r--r-- | lib/OpenPGP.hs | 7 |
1 files changed, 7 insertions, 0 deletions
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] | |||
282 | data HashAlgorithm = MD5 | SHA1 | RIPEMD160 | SHA256 | SHA384 | SHA512 | SHA224 | 282 | data HashAlgorithm = MD5 | SHA1 | RIPEMD160 | SHA256 | SHA384 | SHA512 | SHA224 |
283 | deriving (Show, Read, Eq) | 283 | deriving (Show, Read, Eq) |
284 | instance Binary HashAlgorithm where | 284 | instance Binary HashAlgorithm where |
285 | put MD5 = put (01 :: Word8) | ||
286 | put SHA1 = put (02 :: Word8) | ||
287 | put RIPEMD160 = put (03 :: Word8) | ||
288 | put SHA256 = put (08 :: Word8) | ||
289 | put SHA384 = put (09 :: Word8) | ||
290 | put SHA512 = put (10 :: Word8) | ||
291 | put SHA224 = put (11 :: Word8) | ||
285 | get = do | 292 | get = do |
286 | tag <- get :: Get Word8 | 293 | tag <- get :: Get Word8 |
287 | case tag of | 294 | case tag of |