From cdea71ee335760b0f9cb8422dd995176cf6bdc5f Mon Sep 17 00:00:00 2001 From: MITSUNARI Shigeo Date: Tue, 30 May 2017 06:23:51 +0900 Subject: rename IsSame to IsEqual --- include/bls/bls_if.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'include/bls') diff --git a/include/bls/bls_if.h b/include/bls/bls_if.h index be1467c..c36ad70 100644 --- a/include/bls/bls_if.h +++ b/include/bls/bls_if.h @@ -67,8 +67,9 @@ BLS_DLL_API int blsGetCurveOrder(char *buf, size_t maxBufSize); BLS_DLL_API int blsGetFieldOrder(char *buf, size_t maxBufSize); // return 1 if same else 0 -BLS_DLL_API int blsIdIsSame(const blsId *lhs, const blsId *rhs); +BLS_DLL_API int blsIdIsEqual(const blsId *lhs, const blsId *rhs); +// mask buf with (1 << (bitLen(r) - 1)) - 1 if buf >= r // return 0 if success BLS_DLL_API int blsIdSetLittleEndian(blsId *id, const void *buf, size_t bufSize); BLS_DLL_API int blsIdSetDecStr(blsId *id, const char *buf, size_t bufSize); @@ -86,8 +87,9 @@ BLS_DLL_API size_t blsIdGetDecStr(char *buf, size_t maxBufSize, const blsId *id) BLS_DLL_API size_t blsIdGetHexStr(char *buf, size_t maxBufSize, const blsId *id); // return 1 if same else 0 -BLS_DLL_API int blsSecretKeyIsSame(const blsSecretKey *lhs, const blsSecretKey *rhs); +BLS_DLL_API int blsSecretKeyIsEqual(const blsSecretKey *lhs, const blsSecretKey *rhs); +// mask buf with (1 << (bitLen(r) - 1)) - 1 if buf >= r // return 0 if success BLS_DLL_API int blsSecretKeySetLittleEndian(blsSecretKey *sec, const void *buf, size_t bufSize); BLS_DLL_API int blsSecretKeySetDecStr(blsSecretKey *sec, const char *buf, size_t bufSize); @@ -122,7 +124,7 @@ BLS_DLL_API int blsSecretKeyRecover(blsSecretKey *sec, const blsSecretKey *secVe BLS_DLL_API void blsGetPop(blsSignature *sig, const blsSecretKey *sec); // return 1 if same else 0 -BLS_DLL_API int blsPublicKeyIsSame(const blsPublicKey *lhs, const blsPublicKey *rhs); +BLS_DLL_API int blsPublicKeyIsEqual(const blsPublicKey *lhs, const blsPublicKey *rhs); // return 0 if success BLS_DLL_API int blsPublicKeyDeserialize(blsPublicKey *pub, const void *buf, size_t bufSize); /* @@ -138,7 +140,7 @@ BLS_DLL_API int blsPublicKeyShare(blsPublicKey *pub, const blsPublicKey *mpk, si BLS_DLL_API int blsPublicKeyRecover(blsPublicKey *pub, const blsPublicKey *pubVec, const blsId *idVec, size_t n); // return 1 if same else 0 -BLS_DLL_API int blsSignatureIsSame(const blsSignature *lhs, const blsSignature *rhs); +BLS_DLL_API int blsSignatureIsEqual(const blsSignature *lhs, const blsSignature *rhs); // return 0 if success BLS_DLL_API int blsSignatureDeserialize(blsSignature *sig, const void *buf, size_t bufSize); -- cgit v1.2.3