summaryrefslogtreecommitdiff
path: root/kiki.hs
diff options
context:
space:
mode:
Diffstat (limited to 'kiki.hs')
-rw-r--r--kiki.hs4
1 files changed, 0 insertions, 4 deletions
diff --git a/kiki.hs b/kiki.hs
index eb997ac..1b5984e 100644
--- a/kiki.hs
+++ b/kiki.hs
@@ -411,13 +411,9 @@ bitcoinAddress network_id k = address
411 Just (MPI x) = lookup 'x' (key k) 411 Just (MPI x) = lookup 'x' (key k)
412 Just (MPI y) = lookup 'y' (key k) 412 Just (MPI y) = lookup 'y' (key k)
413 pub = cannonical_eckey x y 413 pub = cannonical_eckey x y
414#if !defined(VERSION_cryptonite)
415 hsh = S.cons network_id . RIPEMD160.hash . SHA256.hash . S.pack $ pub
416#else
417 hsh = S.cons network_id . ripemd160 . sha256 . S.pack $ pub 414 hsh = S.cons network_id . ripemd160 . sha256 . S.pack $ pub
418 sha256 x = convert (Crypto.Hash.hash x :: Digest SHA256) :: S.ByteString 415 sha256 x = convert (Crypto.Hash.hash x :: Digest SHA256) :: S.ByteString
419 ripemd160 x = convert (Crypto.Hash.hash x :: Digest RIPEMD160) :: S.ByteString 416 ripemd160 x = convert (Crypto.Hash.hash x :: Digest RIPEMD160) :: S.ByteString
420#endif
421 address = base58_encode hsh 417 address = base58_encode hsh
422 418
423whoseKey :: RSAPublicKey -> Map.Map KeyKey KeyData -> [KeyData] 419whoseKey :: RSAPublicKey -> Map.Map KeyKey KeyData -> [KeyData]