diff options
author | joe <joe@jerkface.net> | 2014-04-21 23:43:42 -0400 |
---|---|---|
committer | joe <joe@jerkface.net> | 2014-04-21 23:43:42 -0400 |
commit | d113868bc7393823e73c1285ee1ad9ca818c879f (patch) | |
tree | 63a48825a89d73d3e8fcdf4433678f2d1c229fd0 /kiki.hs | |
parent | 07f3a980eb90a0c8c017d47b1b195c9cb5992447 (diff) |
delete doBTCImport
Diffstat (limited to 'kiki.hs')
-rw-r--r-- | kiki.hs | 24 |
1 files changed, 2 insertions, 22 deletions
@@ -65,6 +65,7 @@ import Base58 | |||
65 | warn str = hPutStrLn stderr str | 65 | warn str = hPutStrLn stderr str |
66 | 66 | ||
67 | 67 | ||
68 | |||
68 | {- | 69 | {- |
69 | RSAPrivateKey ::= SEQUENCE { | 70 | RSAPrivateKey ::= SEQUENCE { |
70 | version Version, | 71 | version Version, |
@@ -479,28 +480,7 @@ bitcoinAddress network_id k = address | |||
479 | -- 0x4e*128+0x3d 10045 | 480 | -- 0x4e*128+0x3d 10045 |
480 | -- 1.2.840.10045.3.1.7 --> NIST P-256 | 481 | -- 1.2.840.10045.3.1.7 --> NIST P-256 |
481 | -- | 482 | -- |
482 | 483 | ||
483 | {- | ||
484 | doBTCImport doDecrypt db (ms,subspec,content) = do | ||
485 | let fetchkey = do | ||
486 | timestamp <- now | ||
487 | let mbk = fmap discardNetworkID $ decode_btc_key timestamp content | ||
488 | discardNetworkID = snd | ||
489 | return $ maybe (Message []) id mbk | ||
490 | let error s = do | ||
491 | warn s | ||
492 | exitFailure | ||
493 | flip (maybe $ error "Cannot import master key.") | ||
494 | subspec $ \tag -> do | ||
495 | Message parsedkey <- fetchkey | ||
496 | flip (maybe $ return db) | ||
497 | (listToMaybe parsedkey) $ \key -> do | ||
498 | let (m0,tailms) = splitAt 1 ms | ||
499 | unless ((null tailms) || null m0) | ||
500 | $ error "Key specification is ambiguous." | ||
501 | doImportG doDecrypt db m0 tag "" key | ||
502 | -} | ||
503 | |||
504 | 484 | ||
505 | {- | 485 | {- |
506 | onionName :: KeyData -> (SockAddr,L.ByteString) | 486 | onionName :: KeyData -> (SockAddr,L.ByteString) |