summaryrefslogtreecommitdiff
path: root/src/Crypto
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2018-06-14 01:52:03 -0400
committerjoe <joe@jerkface.net>2018-06-14 01:52:03 -0400
commit14b5e5189458fb656bd67099d6908eabb029b3b0 (patch)
tree13e8f14addf4938488facc4000af480bbaa703f6 /src/Crypto
parent7705e6075e294a6e93a32ec955f88169473c8ec7 (diff)
Build fixes.
Diffstat (limited to 'src/Crypto')
-rw-r--r--src/Crypto/Tox.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Crypto/Tox.hs b/src/Crypto/Tox.hs
index 0a7f07c3..d1992967 100644
--- a/src/Crypto/Tox.hs
+++ b/src/Crypto/Tox.hs
@@ -263,7 +263,12 @@ computeSharedSecret sk recipient = k `seq` \nonce ->
263 in State hash crypt 263 in State hash crypt
264 where 264 where
265 -- diffie helman 265 -- diffie helman
266#if MIN_VERSION_cryptonite(0,24,0)
267 -- TODO: Handle failure.
268 Cryptonite.CryptoPassed shared = ecdh (Proxy :: Proxy Curve_X25519) sk recipient
269#else
266 shared = ecdh (Proxy :: Proxy Curve_X25519) sk recipient 270 shared = ecdh (Proxy :: Proxy Curve_X25519) sk recipient
271#endif
267 -- shared secret XSalsa key 272 -- shared secret XSalsa key
268 k = hsalsa20 shared zeros24 273 k = hsalsa20 shared zeros24
269 274