diff --git a/src/bls.cpp b/src/bls.cpp index 7586e549b..17e8e4c1f 100644 --- a/src/bls.cpp +++ b/src/bls.cpp @@ -20,6 +20,8 @@ namespace bls { +const size_t BLS::MESSAGE_HASH_LEN; + bool BLSInitResult = BLS::Init(); Util::SecureAllocCallback Util::secureAllocCallback; diff --git a/src/elements.cpp b/src/elements.cpp index 39861f6ec..63405a682 100644 --- a/src/elements.cpp +++ b/src/elements.cpp @@ -19,6 +19,8 @@ namespace bls { +const size_t G1Element::SIZE; + G1Element G1Element::FromBytes(const Bytes& bytes, bool fLegacy) { if (bytes.size() != SIZE) { @@ -214,7 +216,9 @@ G1Element operator*(const bn_t& k, const G1Element& a) { return a * k; } -G2Element G2Element::FromBytes(const Bytes& bytes, const bool fLegacy) +const size_t G2Element::SIZE; + +G2Element G2Element::FromBytes(const Bytes& bytes, bool fLegacy) { if (bytes.size() != SIZE) { throw std::invalid_argument("G2Element::FromBytes: Invalid size"); @@ -429,6 +433,8 @@ G2Element operator*(const bn_t& k, const G2Element& a) { return a * k; } // GTElement +const size_t GTElement::SIZE; + GTElement GTElement::FromBytes(const Bytes& bytes) { if (bytes.size() != SIZE) { diff --git a/src/privatekey.cpp b/src/privatekey.cpp index bfd296d7b..182d7781b 100644 --- a/src/privatekey.cpp +++ b/src/privatekey.cpp @@ -17,6 +17,8 @@ namespace bls { +const size_t PrivateKey::PRIVATE_KEY_SIZE; + // Construct a private key from a bytearray. PrivateKey PrivateKey::FromBytes(const Bytes& bytes, bool modOrder) {