diff options
author | MITSUNARI Shigeo <herumi@nifty.com> | 2017-04-09 12:46:11 +0800 |
---|---|---|
committer | MITSUNARI Shigeo <herumi@nifty.com> | 2017-04-09 12:46:11 +0800 |
commit | f299770465daefdb309c72845f41c9c078ba6d49 (patch) | |
tree | 6cff3d051058ab9721966f58183e0220ba500539 /include | |
parent | 3691dc9dfffad8b3985c00a082af9ae8146fb8d5 (diff) | |
download | dexon-bls-f299770465daefdb309c72845f41c9c078ba6d49.tar dexon-bls-f299770465daefdb309c72845f41c9c078ba6d49.tar.gz dexon-bls-f299770465daefdb309c72845f41c9c078ba6d49.tar.bz2 dexon-bls-f299770465daefdb309c72845f41c9c078ba6d49.tar.lz dexon-bls-f299770465daefdb309c72845f41c9c078ba6d49.tar.xz dexon-bls-f299770465daefdb309c72845f41c9c078ba6d49.tar.zst dexon-bls-f299770465daefdb309c72845f41c9c078ba6d49.zip |
add getData() and setData()
Diffstat (limited to 'include')
-rw-r--r-- | include/bls.hpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/bls.hpp b/include/bls.hpp index 7b2a673..c4f4769 100644 --- a/include/bls.hpp +++ b/include/bls.hpp @@ -86,6 +86,11 @@ public: bool operator!=(const Id& rhs) const { return !(*this == rhs); } friend std::ostream& operator<<(std::ostream& os, const Id& id); friend std::istream& operator>>(std::istream& is, Id& id); + /* + get tight repl + */ + void getData(std::string& str) const; + void setData(const std::string& str); bool isZero() const; /* set p[0, .., keySize) @@ -110,6 +115,11 @@ public: friend std::ostream& operator<<(std::ostream& os, const SecretKey& sec); friend std::istream& operator>>(std::istream& is, SecretKey& sec); /* + get tight repl + */ + void getData(std::string& str) const; + void setData(const std::string& str); + /* initialize secretKey with random number and set id = 0 */ void init(); @@ -171,6 +181,11 @@ public: friend std::ostream& operator<<(std::ostream& os, const PublicKey& pub); friend std::istream& operator>>(std::istream& is, PublicKey& pub); /* + get tight repl + */ + void getData(std::string& str) const; + void setData(const std::string& str); + /* set public for id from mpk */ void set(const PublicKeyVec& mpk, const Id& id) @@ -206,6 +221,11 @@ public: bool operator!=(const Sign& rhs) const { return !(*this == rhs); } friend std::ostream& operator<<(std::ostream& os, const Sign& s); friend std::istream& operator>>(std::istream& is, Sign& s); + /* + get tight repl + */ + void getData(std::string& str) const; + void setData(const std::string& str); bool verify(const PublicKey& pub, const std::string& m) const; /* verify self(pop) with pub |