diff options
Diffstat (limited to 'kiki.hs')
-rw-r--r-- | kiki.hs | 4 |
1 files changed, 0 insertions, 4 deletions
@@ -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 | ||
423 | whoseKey :: RSAPublicKey -> Map.Map KeyKey KeyData -> [KeyData] | 419 | whoseKey :: RSAPublicKey -> Map.Map KeyKey KeyData -> [KeyData] |