diff options
author | Andrew Cady <d@jerkface.net> | 2019-07-13 15:19:49 -0400 |
---|---|---|
committer | Andrew Cady <d@jerkface.net> | 2019-07-13 15:19:49 -0400 |
commit | 495d9fbac3d633b768d910fced5cf00d00118fa0 (patch) | |
tree | a837bd0f3944f80b3c336660aacd872f86d889d1 /kiki.hs | |
parent | 924fd74fd48f83a6061330db6013a0c7419e83a1 (diff) |
cpp conditionals died of old age
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] |