aboutsummaryrefslogtreecommitdiffstats
path: root/go/bls
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <herumi@nifty.com>2016-09-07 06:31:11 +0800
committerMITSUNARI Shigeo <herumi@nifty.com>2016-09-07 06:31:11 +0800
commit9b6af7cbc8965c2f166f0979e1d64ec7369aaf9c (patch)
tree146abcdac0deeab5b6c42736031ad1bf8ed9dd63 /go/bls
parentaac66669fcb761f51bf2709d28d0c5753f08db95 (diff)
downloaddexon-bls-9b6af7cbc8965c2f166f0979e1d64ec7369aaf9c.tar
dexon-bls-9b6af7cbc8965c2f166f0979e1d64ec7369aaf9c.tar.gz
dexon-bls-9b6af7cbc8965c2f166f0979e1d64ec7369aaf9c.tar.bz2
dexon-bls-9b6af7cbc8965c2f166f0979e1d64ec7369aaf9c.tar.lz
dexon-bls-9b6af7cbc8965c2f166f0979e1d64ec7369aaf9c.tar.xz
dexon-bls-9b6af7cbc8965c2f166f0979e1d64ec7369aaf9c.tar.zst
dexon-bls-9b6af7cbc8965c2f166f0979e1d64ec7369aaf9c.zip
add SecretKey::setArray
Diffstat (limited to 'go/bls')
-rw-r--r--go/bls/bls.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/go/bls/bls.go b/go/bls/bls.go
index 0506c10..2f7e8ca 100644
--- a/go/bls/bls.go
+++ b/go/bls/bls.go
@@ -88,6 +88,14 @@ func (sec *SecretKey) SetStr(s string) error {
return nil
}
+func (sec *SecretKey) SetArray(v []uint64) error {
+ if len(v) != 4 {
+ return fmt.Errorf("bad size", len(v))
+ }
+ C.blsSecretKeySetArray(sec.self, (*C.uint64_t)(unsafe.Pointer(&v[0])))
+ return nil
+}
+
func (sec *SecretKey) Init() {
C.blsSecretKeyInit(sec.self)
}