diff options
author | MITSUNARI Shigeo <herumi@nifty.com> | 2017-05-30 05:23:51 +0800 |
---|---|---|
committer | MITSUNARI Shigeo <herumi@nifty.com> | 2017-05-30 05:23:51 +0800 |
commit | cdea71ee335760b0f9cb8422dd995176cf6bdc5f (patch) | |
tree | 140cb75fc796420c77ca415b2b28a03d0826634c /include/bls | |
parent | 4854a50087865b7f4f4147a43e9ff21c26df7e1f (diff) | |
download | dexon-bls-cdea71ee335760b0f9cb8422dd995176cf6bdc5f.tar dexon-bls-cdea71ee335760b0f9cb8422dd995176cf6bdc5f.tar.gz dexon-bls-cdea71ee335760b0f9cb8422dd995176cf6bdc5f.tar.bz2 dexon-bls-cdea71ee335760b0f9cb8422dd995176cf6bdc5f.tar.lz dexon-bls-cdea71ee335760b0f9cb8422dd995176cf6bdc5f.tar.xz dexon-bls-cdea71ee335760b0f9cb8422dd995176cf6bdc5f.tar.zst dexon-bls-cdea71ee335760b0f9cb8422dd995176cf6bdc5f.zip |
rename IsSame to IsEqual
Diffstat (limited to 'include/bls')
-rw-r--r-- | include/bls/bls_if.h | 10 |
1 files changed, 6 insertions, 4 deletions
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); |