summaryrefslogtreecommitdiff
path: root/Data/OpenPGP/Util/Cv25519.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Data/OpenPGP/Util/Cv25519.hs')
-rw-r--r--Data/OpenPGP/Util/Cv25519.hs13
1 files changed, 0 insertions, 13 deletions
diff --git a/Data/OpenPGP/Util/Cv25519.hs b/Data/OpenPGP/Util/Cv25519.hs
index abf1ba6..bc1cacb 100644
--- a/Data/OpenPGP/Util/Cv25519.hs
+++ b/Data/OpenPGP/Util/Cv25519.hs
@@ -67,19 +67,6 @@ privateCv25519Key k@SecretKeyPacket { key_algorithm = ECC, symmetric_algorithm =
67 CryptoPassed cv25519sec -> Just cv25519sec 67 CryptoPassed cv25519sec -> Just cv25519sec
68 CryptoFailed err -> Nothing 68 CryptoFailed err -> Nothing
69 69
70hexify = map toUpper . hexString . BS.unpack
71
72
73
74hexString :: [Word8] -> String
75hexString = foldr (pad `oo` showHex) ""
76 where
77 pad s | odd $ length s = '0':s
78 | otherwise = s
79
80 oo :: (b -> c) -> (a -> a1 -> b) -> a -> a1 -> c
81 oo = (.) . (.)
82
83cv25519Key :: [(Char,MPI)] -> Maybe Cv25519.PublicKey 70cv25519Key :: [(Char,MPI)] -> Maybe Cv25519.PublicKey
84cv25519Key k = do 71cv25519Key k = do
85 MPI flag <- lookup 'f' k 72 MPI flag <- lookup 'f' k