diff options
Diffstat (limited to 'Data/OpenPGP/Util/Fingerprint.hs')
-rw-r--r-- | Data/OpenPGP/Util/Fingerprint.hs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Data/OpenPGP/Util/Fingerprint.hs b/Data/OpenPGP/Util/Fingerprint.hs index b2e3904..c1d8fef 100644 --- a/Data/OpenPGP/Util/Fingerprint.hs +++ b/Data/OpenPGP/Util/Fingerprint.hs | |||
@@ -1,5 +1,5 @@ | |||
1 | {-# LANGUAGE CPP #-} | 1 | {-# LANGUAGE CPP #-} |
2 | module Data.OpenPGP.Util.Fingerprint (fingerprint,Fingerprint(..)) where | 2 | module Data.OpenPGP.Util.Fingerprint (fingerprint,Fingerprint(..),hex) where |
3 | 3 | ||
4 | import qualified Data.OpenPGP as OpenPGP | 4 | import qualified Data.OpenPGP as OpenPGP |
5 | import qualified Data.ByteString as BS | 5 | import qualified Data.ByteString as BS |
@@ -23,7 +23,10 @@ oo = (.) . (.) | |||
23 | newtype Fingerprint = Fingerprint BS.ByteString | 23 | newtype Fingerprint = Fingerprint BS.ByteString |
24 | 24 | ||
25 | instance Show Fingerprint where | 25 | instance Show Fingerprint where |
26 | show (Fingerprint bs) = hexify bs | 26 | show fp = hex fp |
27 | |||
28 | hex :: Fingerprint -> String | ||
29 | hex (Fingerprint bs) = hexify bs | ||
27 | where | 30 | where |
28 | hexify = map toUpper . hexString . BS.unpack | 31 | hexify = map toUpper . hexString . BS.unpack |
29 | 32 | ||