aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--go/bls/bls.go2
-rw-r--r--include/bls/bls.h2
-rw-r--r--src/bls_c.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/go/bls/bls.go b/go/bls/bls.go
index deeeeb5..41e0bc6 100644
--- a/go/bls/bls.go
+++ b/go/bls/bls.go
@@ -422,7 +422,7 @@ func (sec *SecretKey) Sign(m string) (sign *Sign) {
sign = new(Sign)
buf := []byte(m)
// #nosec
- C.blsSign(sign.getPointer(), sec.getPointer(), (*C.char)(unsafe.Pointer(&buf[0])), C.size_t(len(buf)))
+ C.blsSign(sign.getPointer(), sec.getPointer(), unsafe.Pointer(&buf[0]), C.size_t(len(buf)))
return sign
}
diff --git a/include/bls/bls.h b/include/bls/bls.h
index e15a82b..54f14de 100644
--- a/include/bls/bls.h
+++ b/include/bls/bls.h
@@ -115,7 +115,7 @@ BLS_DLL_API int blsSecretKeyRecover(blsSecretKey *sec, const blsSecretKey *secVe
BLS_DLL_API int blsPublicKeyRecover(blsPublicKey *pub, const blsPublicKey *pubVec, const blsId *idVec, size_t n);
BLS_DLL_API int blsSignatureRecover(blsSignature *sig, const blsSignature *sigVec, const blsId *idVec, size_t n);
-BLS_DLL_API void blsSign(blsSignature *sig, const blsSecretKey *sec, const char *m, size_t size);
+BLS_DLL_API void blsSign(blsSignature *sig, const blsSecretKey *sec, const void *m, size_t size);
// return 1 if valid
BLS_DLL_API int blsVerify(const blsSignature *sig, const blsPublicKey *pub, const void *m, size_t size);
diff --git a/src/bls_c.cpp b/src/bls_c.cpp
index c9e2408..5a56221 100644
--- a/src/bls_c.cpp
+++ b/src/bls_c.cpp
@@ -198,7 +198,7 @@ void blsGetPublicKey(blsPublicKey *pub, const blsSecretKey *sec)
{
mclBnG2_mul(&pub->v, cast(&getQ()), &sec->v);
}
-void blsSign(blsSignature *sig, const blsSecretKey *sec, const char *m, size_t size)
+void blsSign(blsSignature *sig, const blsSecretKey *sec, const void *m, size_t size)
{
G1 Hm;
BN::hashAndMapToG1(Hm, m, size);