Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
bbjubjub2494 authored and UdjinM6 committed Dec 1, 2021
1 parent 9d1be94 commit 35c750e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/bls.cpp
Expand Up @@ -20,6 +20,8 @@

namespace bls {

const size_t BLS::MESSAGE_HASH_LEN;

bool BLSInitResult = BLS::Init();

Util::SecureAllocCallback Util::secureAllocCallback;
Expand Down
8 changes: 7 additions & 1 deletion src/elements.cpp
Expand Up @@ -19,6 +19,8 @@

namespace bls {

const size_t G1Element::SIZE;

G1Element G1Element::FromBytes(const Bytes& bytes, bool fLegacy)
{
if (bytes.size() != SIZE) {
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 2 additions & 0 deletions src/privatekey.cpp
Expand Up @@ -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)
{
Expand Down

0 comments on commit 35c750e

Please sign in to comment.