summaryrefslogtreecommitdiff
path: root/3way.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2016-09-06 02:51:16 -0400
committerJeffrey Walton <noloader@gmail.com>2016-09-06 02:51:16 -0400
commit45323bddd83982a183714d91167194f73bab1440 (patch)
tree8b6d2543d1fba8a03b12572b8571155a8e972df7 /3way.cpp
parent33522b39b1de5806798bded49e481baecb56dc58 (diff)
downloadcryptopp-git-45323bddd83982a183714d91167194f73bab1440.tar.gz
Initial fix for older Apple ld's non_lazy_ptr missing symbols (Issue 255)
Diffstat (limited to '3way.cpp')
-rw-r--r--3way.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/3way.cpp b/3way.cpp
index ad57edf5..c6784ee8 100644
--- a/3way.cpp
+++ b/3way.cpp
@@ -15,6 +15,11 @@ void ThreeWay_TestInstantiations()
}
#endif
+// Hack for OS X 10.5 ld, http://github.com/weidai11/cryptopp/issues/255
+static const size_t s_unused1 = ThreeWay::KEYLENGTH;
+static const size_t s_unused2 = ThreeWayEncryption::KEYLENGTH;
+static const size_t s_unused3 = ThreeWayDecryption::KEYLENGTH;
+
static const word32 START_E = 0x0b0b; // round constant of first encryption round
static const word32 START_D = 0xb1b1; // round constant of first decryption round
#ifdef CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY_562
@@ -57,13 +62,13 @@ static inline word32 reverseBits(word32 a)
a0 ^= c ^ b0; \
a1 ^= c ^ b1; \
a2 ^= c ^ (b0 >> 16) ^ (b1 << 16); \
-}
+}
#define rho(a0, a1, a2) \
{ \
theta(a0, a1, a2); \
pi_gamma_pi(a0, a1, a2); \
-}
+}
void ThreeWay::Base::UncheckedSetKey(const byte *uk, unsigned int length, const NameValuePairs &params)
{