aboutsummaryrefslogtreecommitdiffstats
path: root/go/bls
diff options
context:
space:
mode:
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