aboutsummaryrefslogtreecommitdiffstats
path: root/ffi/go
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <herumi@nifty.com>2017-06-07 04:11:06 +0800
committerMITSUNARI Shigeo <herumi@nifty.com>2017-06-07 04:11:06 +0800
commitcb3cee454cd96b67b6de3264879988b7c321505c (patch)
tree44658bf2c902a4d3884c2848090ddfcf415cdc9f /ffi/go
parent10d9c02a83f48248d887cd141b7d1f6b5efddbee (diff)
downloaddexon-mcl-cb3cee454cd96b67b6de3264879988b7c321505c.tar.gz
dexon-mcl-cb3cee454cd96b67b6de3264879988b7c321505c.tar.zst
dexon-mcl-cb3cee454cd96b67b6de3264879988b7c321505c.zip
increase bufSize to get string
Diffstat (limited to 'ffi/go')
-rw-r--r--ffi/go/mcl/mcl.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/ffi/go/mcl/mcl.go b/ffi/go/mcl/mcl.go
index d48feac..c2456b9 100644
--- a/ffi/go/mcl/mcl.go
+++ b/ffi/go/mcl/mcl.go
@@ -115,7 +115,7 @@ func (x *Fr) SetHashOf(buf []byte) bool {
// GetString --
func (x *Fr) GetString(base int) string {
- buf := make([]byte, 1024)
+ buf := make([]byte, 2048)
// #nosec
n := C.mclBnFr_getStr((*C.char)(unsafe.Pointer(&buf[0])), C.size_t(len(buf)), x.getPointer(), C.int(base))
if n == 0 {
@@ -126,7 +126,7 @@ func (x *Fr) GetString(base int) string {
// Serialize --
func (x *Fr) Serialize() []byte {
- buf := make([]byte, 1024)
+ buf := make([]byte, 2048)
// #nosec
n := C.mclBnFr_serialize(unsafe.Pointer(&buf[0]), C.size_t(len(buf)), x.getPointer())
if n == 0 {
@@ -226,7 +226,7 @@ func (x *G1) HashAndMapTo(buf []byte) error {
// GetString --
func (x *G1) GetString(base int) string {
- buf := make([]byte, 1024)
+ buf := make([]byte, 2048)
// #nosec
n := C.mclBnG1_getStr((*C.char)(unsafe.Pointer(&buf[0])), C.size_t(len(buf)), x.getPointer(), C.int(base))
if n == 0 {
@@ -237,7 +237,7 @@ func (x *G1) GetString(base int) string {
// Serialize --
func (x *G1) Serialize() []byte {
- buf := make([]byte, 1024)
+ buf := make([]byte, 2048)
// #nosec
n := C.mclBnG1_serialize(unsafe.Pointer(&buf[0]), C.size_t(len(buf)), x.getPointer())
if n == 0 {
@@ -332,7 +332,7 @@ func (x *G2) HashAndMapTo(buf []byte) error {
// GetString --
func (x *G2) GetString(base int) string {
- buf := make([]byte, 1024)
+ buf := make([]byte, 2048)
// #nosec
n := C.mclBnG2_getStr((*C.char)(unsafe.Pointer(&buf[0])), C.size_t(len(buf)), x.getPointer(), C.int(base))
if n == 0 {
@@ -343,7 +343,7 @@ func (x *G2) GetString(base int) string {
// Serialize --
func (x *G2) Serialize() []byte {
- buf := make([]byte, 1024)
+ buf := make([]byte, 2048)
// #nosec
n := C.mclBnG2_serialize(unsafe.Pointer(&buf[0]), C.size_t(len(buf)), x.getPointer())
if n == 0 {
@@ -433,7 +433,7 @@ func (x *GT) IsOne(rhs *GT) bool {
// GetString --
func (x *GT) GetString(base int) string {
- buf := make([]byte, 1024)
+ buf := make([]byte, 2048)
// #nosec
n := C.mclBnGT_getStr((*C.char)(unsafe.Pointer(&buf[0])), C.size_t(len(buf)), x.getPointer(), C.int(base))
if n == 0 {
@@ -444,7 +444,7 @@ func (x *GT) GetString(base int) string {
// Serialize --
func (x *GT) Serialize() []byte {
- buf := make([]byte, 1024)
+ buf := make([]byte, 2048)
// #nosec
n := C.mclBnGT_serialize(unsafe.Pointer(&buf[0]), C.size_t(len(buf)), x.getPointer())
if n == 0 {