diff options
author | MITSUNARI Shigeo <herumi@nifty.com> | 2017-04-09 14:50:50 +0800 |
---|---|---|
committer | MITSUNARI Shigeo <herumi@nifty.com> | 2017-04-09 14:50:50 +0800 |
commit | 076cb73f57616c4ddc01db19c6c0487cd886d6a8 (patch) | |
tree | caf06716c3e7d19711222b0af38ae7f3a405fad1 /include/bls_if.h | |
parent | f299770465daefdb309c72845f41c9c078ba6d49 (diff) | |
download | dexon-bls-076cb73f57616c4ddc01db19c6c0487cd886d6a8.tar dexon-bls-076cb73f57616c4ddc01db19c6c0487cd886d6a8.tar.gz dexon-bls-076cb73f57616c4ddc01db19c6c0487cd886d6a8.tar.bz2 dexon-bls-076cb73f57616c4ddc01db19c6c0487cd886d6a8.tar.lz dexon-bls-076cb73f57616c4ddc01db19c6c0487cd886d6a8.tar.xz dexon-bls-076cb73f57616c4ddc01db19c6c0487cd886d6a8.tar.zst dexon-bls-076cb73f57616c4ddc01db19c6c0487cd886d6a8.zip |
add GetData/SetData/IsSame
Diffstat (limited to 'include/bls_if.h')
-rw-r--r-- | include/bls_if.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/bls_if.h b/include/bls_if.h index ce8463e..eb7ba4e 100644 --- a/include/bls_if.h +++ b/include/bls_if.h @@ -48,6 +48,10 @@ size_t blsGetOpUnitSize(void); blsId *blsIdCreate(void); void blsIdDestroy(blsId *id); +size_t blsIdGetData(const blsId *id, char *buf, size_t maxBufSize); +int blsIdSetData(blsId *id, const char *buf, size_t bufSize); +// return 1 if same else 0 +int blsIdIsSame(const blsId *lhs, const blsId *rhs); void blsIdPut(const blsId *id); void blsIdCopy(blsId *dst, const blsId *src); @@ -67,6 +71,11 @@ void blsIdSet(blsId *id, const uint64_t *p); blsSecretKey* blsSecretKeyCreate(void); void blsSecretKeyDestroy(blsSecretKey *sec); +size_t blsSecretKeyGetData(const blsSecretKey *sec, char *buf, size_t maxBufSize); +int blsSecretKeySetData(blsSecretKey *sec, const char *buf, size_t bufSize); +// return 1 if same else 0 +int blsSecretKeyIsSame(const blsSecretKey *lhs, const blsSecretKey *rhs); + void blsSecretKeyPut(const blsSecretKey *sec); void blsSecretKeyCopy(blsSecretKey *dst, const blsSecretKey *src); void blsSecretKeySetArray(blsSecretKey *sec, const uint64_t *p); @@ -83,6 +92,10 @@ void blsSecretKeyGetPop(const blsSecretKey *sec, blsSign *sign); blsPublicKey *blsPublicKeyCreate(void); void blsPublicKeyDestroy(blsPublicKey *pub); +size_t blsPublicKeyGetData(const blsPublicKey *pub, char *buf, size_t maxBufSize); +int blsPublicKeySetData(blsPublicKey *pub, const char *buf, size_t bufSize); +// return 1 if same else 0 +int blsPublicKeyIsSame(const blsPublicKey *lhs, const blsPublicKey *rhs); void blsPublicKeyPut(const blsPublicKey *pub); void blsPublicKeyCopy(blsPublicKey *dst, const blsPublicKey *src); int blsPublicKeySetStr(blsPublicKey *pub, const char *buf, size_t bufSize); @@ -93,6 +106,10 @@ void blsPublicKeyRecover(blsPublicKey *pub, const blsPublicKey *pubVec, const bl blsSign *blsSignCreate(void); void blsSignDestroy(blsSign *sign); +size_t blsSignGetData(const blsSign *sign, char *buf, size_t maxBufSize); +int blsSignSetData(blsSign *sign, const char *buf, size_t bufSize); +// return 1 if same else 0 +int blsSignIsSame(const blsSign *lhs, const blsSign *rhs); void blsSignPut(const blsSign *sign); void blsSignCopy(blsSign *dst, const blsSign *src); int blsSignSetStr(blsSign *sign, const char *buf, size_t bufSize); |