aboutsummaryrefslogtreecommitdiffstats
path: root/go/bls
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <herumi@nifty.com>2016-09-06 16:40:22 +0800
committerMITSUNARI Shigeo <herumi@nifty.com>2016-09-06 16:40:22 +0800
commit00c3253835763f5f7da16981719c5e751bf7b3e7 (patch)
tree8899cf0b8c2c71d26fded6114aa56fd00e31ef46 /go/bls
parent1a4fb4458cbf69628a541c3957b53e01ea661cd4 (diff)
downloaddexon-bls-00c3253835763f5f7da16981719c5e751bf7b3e7.tar
dexon-bls-00c3253835763f5f7da16981719c5e751bf7b3e7.tar.gz
dexon-bls-00c3253835763f5f7da16981719c5e751bf7b3e7.tar.bz2
dexon-bls-00c3253835763f5f7da16981719c5e751bf7b3e7.tar.lz
dexon-bls-00c3253835763f5f7da16981719c5e751bf7b3e7.tar.xz
dexon-bls-00c3253835763f5f7da16981719c5e751bf7b3e7.tar.zst
dexon-bls-00c3253835763f5f7da16981719c5e751bf7b3e7.zip
add Add(rhs) method
Diffstat (limited to 'go/bls')
-rw-r--r--go/bls/bls.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/go/bls/bls.go b/go/bls/bls.go
index df03734..5ba2f24 100644
--- a/go/bls/bls.go
+++ b/go/bls/bls.go
@@ -90,6 +90,10 @@ func (sec *SecretKey) Init() {
C.blsSecretKeyInit(sec.self)
}
+func (sec *SecretKey) Add(rhs *SecretKey) {
+ C.blsSecretKeyAdd(sec.self, rhs.self);
+}
+
type PublicKey struct {
self *C.blsPublicKey
}
@@ -122,6 +126,10 @@ func (pub *PublicKey) SetStr(s string) {
}
}
+func (pub *PublicKey) Add(rhs *PublicKey) {
+ C.blsPublicKeyAdd(pub.self, rhs.self);
+}
+
type Sign struct {
self *C.blsSign
}
@@ -167,6 +175,10 @@ func (sec *SecretKey) Sign(m string) (sign *Sign) {
return sign
}
+func (sign *Sign) Add(rhs *Sign) {
+ C.blsSignAdd(sign.self, rhs.self);
+}
+
func (sign *Sign) Verify(pub *PublicKey, m string) bool {
buf := []byte(m)
return C.blsSignVerify(sign.self, pub.self, (*C.char)(unsafe.Pointer(&buf[0])), C.size_t(len(buf))) == 1