From 14b5e5189458fb656bd67099d6908eabb029b3b0 Mon Sep 17 00:00:00 2001 From: joe Date: Thu, 14 Jun 2018 01:52:03 -0400 Subject: Build fixes. --- src/Crypto/Tox.hs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') 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 -> in State hash crypt where -- diffie helman +#if MIN_VERSION_cryptonite(0,24,0) + -- TODO: Handle failure. + Cryptonite.CryptoPassed shared = ecdh (Proxy :: Proxy Curve_X25519) sk recipient +#else shared = ecdh (Proxy :: Proxy Curve_X25519) sk recipient +#endif -- shared secret XSalsa key k = hsalsa20 shared zeros24 -- cgit v1.2.3