diff options
author | MITSUNARI Shigeo <herumi@nifty.com> | 2016-08-30 11:51:53 +0800 |
---|---|---|
committer | MITSUNARI Shigeo <herumi@nifty.com> | 2016-08-30 11:51:53 +0800 |
commit | d50143e7909559f745f33090d429b3105af0ee4d (patch) | |
tree | 5b197ff2d54e4a3fe2ac26c8d2407f7e41b5cb14 /include | |
parent | 85ccb843bd20ca11c8bb0f3582e420698acc04ee (diff) | |
download | dexon-bls-d50143e7909559f745f33090d429b3105af0ee4d.tar dexon-bls-d50143e7909559f745f33090d429b3105af0ee4d.tar.gz dexon-bls-d50143e7909559f745f33090d429b3105af0ee4d.tar.bz2 dexon-bls-d50143e7909559f745f33090d429b3105af0ee4d.tar.lz dexon-bls-d50143e7909559f745f33090d429b3105af0ee4d.tar.xz dexon-bls-d50143e7909559f745f33090d429b3105af0ee4d.tar.zst dexon-bls-d50143e7909559f745f33090d429b3105af0ee4d.zip |
change id to public menmber and remove id from io
Diffstat (limited to 'include')
-rw-r--r-- | include/bls.hpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/include/bls.hpp b/include/bls.hpp index 57ae73e..1d33777 100644 --- a/include/bls.hpp +++ b/include/bls.hpp @@ -81,19 +81,18 @@ public: */ class SecretKey { impl::SecretKey *self_; - Id id_; // master if id_ = 0, shared if id_ > 0 template<class G, class T> friend void LagrangeInterpolation(G& r, const T& vec); template<class T, class G> friend struct Wrap; public: + Id id; // master if id = 0, shared if id > 0 SecretKey(); ~SecretKey(); SecretKey(const SecretKey& rhs); SecretKey& operator=(const SecretKey& rhs); bool operator==(const SecretKey& rhs) const; bool operator!=(const SecretKey& rhs) const { return !(*this == rhs); } - const Id& getId() const { return id_; } friend std::ostream& operator<<(std::ostream& os, const SecretKey& sec); friend std::istream& operator>>(std::istream& is, SecretKey& sec); /* @@ -135,7 +134,6 @@ public: */ class PublicKey { impl::PublicKey *self_; - Id id_; friend class SecretKey; friend class Sign; template<class G, class T> @@ -143,13 +141,13 @@ class PublicKey { template<class T, class G> friend struct Wrap; public: + Id id; PublicKey(); ~PublicKey(); PublicKey(const PublicKey& rhs); PublicKey& operator=(const PublicKey& rhs); bool operator==(const PublicKey& rhs) const; bool operator!=(const PublicKey& rhs) const { return !(*this == rhs); } - const Id& getId() const { return id_; } friend std::ostream& operator<<(std::ostream& os, const PublicKey& pub); friend std::istream& operator>>(std::istream& is, PublicKey& pub); void getStr(std::string& str) const; @@ -172,19 +170,18 @@ public: */ class Sign { impl::Sign *self_; - Id id_; friend class PublicKey; friend class SecretKey; template<class G, class T> friend void LagrangeInterpolation(G& r, const T& vec); public: + Id id; Sign(); ~Sign(); Sign(const Sign& rhs); Sign& operator=(const Sign& rhs); bool operator==(const Sign& rhs) const; bool operator!=(const Sign& rhs) const { return !(*this == rhs); } - const Id& getId() const { return id_; } friend std::ostream& operator<<(std::ostream& os, const Sign& s); friend std::istream& operator>>(std::istream& is, Sign& s); bool verify(const PublicKey& pub, const std::string& m) const; |