secp256k1 0.1.7 → 0.1.8
raw patch · 2 files changed
+17/−8 lines, 2 files
Files
- secp256k1.cabal +1/−1
- src/Crypto/Secp256k1.hs +16/−7
secp256k1.cabal view
@@ -1,5 +1,5 @@ name: secp256k1-version: 0.1.7+version: 0.1.8 synopsis: secp256k1 bindings for Haskell description: Please see README.md homepage: http://github.com/haskoin/secp256k1#readme
src/Crypto/Secp256k1.hs view
@@ -70,6 +70,7 @@ -- TODO: Test instance Read PubKey where readPrec = parens $ do+ Ident "PubKey" <- lexP String str <- lexP maybe pfail return $ importPubKey =<< decodeHex str @@ -79,11 +80,13 @@ -- TODO: Test instance Show PubKey where- show = show . B16.encode . exportPubKey True+ showsPrec d k = showParen (d > 10) $+ showString "PubKey " . shows (B16.encode $ exportPubKey True k) -- TODO: Test instance Read Msg where readPrec = parens $ do+ Ident "Msg" <- lexP String str <- lexP maybe pfail return $ msg =<< decodeHex str @@ -93,11 +96,13 @@ -- TODO: Test instance Show Msg where- show = show . B16.encode . getMsg+ showsPrec d m = showParen (d > 10) $+ showString "Msg " . shows (B16.encode $ getMsg m) -- TODO: Test instance Read Sig where readPrec = parens $ do+ Ident "Sig" <- lexP String str <- lexP maybe pfail return $ importSig =<< decodeHex str @@ -107,14 +112,15 @@ -- TODO: Test instance Show Sig where- show = show . B16.encode . exportSig+ showsPrec d s = showParen (d > 10) $+ showString "Sig " . shows (B16.encode $ exportSig s) -- TODO: Test instance Read SecKey where readPrec = parens $ do+ Ident "SecKey" <- lexP String str <- lexP- maybe pfail return $- (secKey =<< decodeHex str) <|> (importSecKey =<< decodeHex str)+ maybe pfail return $ secKey =<< decodeHex str -- TODO: Test instance IsString SecKey where@@ -123,11 +129,13 @@ -- TODO: Test instance Show SecKey where- show = show . B16.encode . getSecKey+ showsPrec d k = showParen (d > 10) $+ showString "SecKey " . shows (B16.encode $ getSecKey k) -- TODO: Test instance Read Tweak where readPrec = parens $ do+ Ident "Tweak" <- lexP String str <- lexP maybe pfail return $ tweak =<< decodeHex str @@ -137,7 +145,8 @@ -- TODO: Test instance Show Tweak where- show = show . B16.encode . getTweak+ showsPrec d k = showParen (d > 10) $+ showString "Tweak " . shows (B16.encode $ getTweak k) instance Eq PubKey where fp1 == fp2 = getPubKey fp1 == getPubKey fp2