Browse Source

fixed build for gcc < 4.8

pull/1221/head
orignal 6 years ago
parent
commit
f38891cace
  1. 7
      libi2pd/Poly1305.cpp

7
libi2pd/Poly1305.cpp

@ -133,9 +133,14 @@ namespace crypto
struct Poly1305 struct Poly1305
{ {
#if (__GNUC__ == 4) && (__GNUC_MINOR__ < 8) // older than gcc 4.8
Poly1305(const uint8_t * key) : m_Leftover(0), m_Final(0)
{
memset (m_H, 0, sizeof (m_H));
#else
Poly1305(const uint8_t * key) : m_Leftover(0), m_H{0}, m_Final(0) Poly1305(const uint8_t * key) : m_Leftover(0), m_H{0}, m_Final(0)
{ {
#endif
m_R.PutKey(key); m_R.PutKey(key);
m_Pad.Put(key + 16); m_Pad.Put(key + 16);
} }

Loading…
Cancel
Save