summaryrefslogtreecommitdiff
path: root/dht/src/Network/Tox/NodeId.hs
diff options
context:
space:
mode:
Diffstat (limited to 'dht/src/Network/Tox/NodeId.hs')
-rw-r--r--dht/src/Network/Tox/NodeId.hs8
1 files changed, 3 insertions, 5 deletions
diff --git a/dht/src/Network/Tox/NodeId.hs b/dht/src/Network/Tox/NodeId.hs
index 667e7d71..3a2a4f07 100644
--- a/dht/src/Network/Tox/NodeId.hs
+++ b/dht/src/Network/Tox/NodeId.hs
@@ -37,9 +37,8 @@ module Network.Tox.NodeId
37 , verifyChecksum 37 , verifyChecksum
38 , ToxContact(..) 38 , ToxContact(..)
39 , ToxProgress(..) 39 , ToxProgress(..)
40 , parseToken32 40 , showBase64Key256
41 , showToken32 41 , showBase32Key256
42 , show32Token32
43 , nodeInfoFromJSON 42 , nodeInfoFromJSON
44 , showHexId 43 , showHexId
45 ) where 44 ) where
@@ -97,7 +96,6 @@ import System.Endian
97import qualified Data.Text as Text 96import qualified Data.Text as Text
98 ;import Data.Text (Text) 97 ;import Data.Text (Text)
99import Util (splitJID) 98import Util (splitJID)
100import Codec.AsciiKey256
101 99
102-- | perform io for hashes that do allocation and ffi. 100-- | perform io for hashes that do allocation and ffi.
103-- unsafeDupablePerformIO is used when possible as the 101-- unsafeDupablePerformIO is used when possible as the
@@ -174,7 +172,7 @@ instance Read NodeId where
174 readsPrec _ str = readsPrecKey256 (fmap key2id . maybeCryptoError . publicKey) str 172 readsPrec _ str = readsPrecKey256 (fmap key2id . maybeCryptoError . publicKey) str
175 173
176instance Show NodeId where 174instance Show NodeId where
177 show nid = show32Token32 $ id2key nid 175 show nid = showBase32Key256 $ id2key nid
178 176
179instance S.Serialize NodeId where 177instance S.Serialize NodeId where
180 get = key2id <$> getPublicKey 178 get = key2id <$> getPublicKey