diff options
author | MITSUNARI Shigeo <herumi@nifty.com> | 2016-09-06 15:54:21 +0800 |
---|---|---|
committer | MITSUNARI Shigeo <herumi@nifty.com> | 2016-09-06 15:54:21 +0800 |
commit | e6ccbbea70fb8d6a89f5593df47b160d01a29fd3 (patch) | |
tree | 6ad9ce27d5c2673f50fd370fa7b39626c6642b16 /include | |
parent | 240ec03f333c6ab09f409ab719a2a5b31c7dc60d (diff) | |
download | dexon-bls-e6ccbbea70fb8d6a89f5593df47b160d01a29fd3.tar.gz dexon-bls-e6ccbbea70fb8d6a89f5593df47b160d01a29fd3.tar.zst dexon-bls-e6ccbbea70fb8d6a89f5593df47b160d01a29fd3.zip |
make class
Diffstat (limited to 'include')
-rw-r--r-- | include/bls_if.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/bls_if.h b/include/bls_if.h index ed05106..ac68495 100644 --- a/include/bls_if.h +++ b/include/bls_if.h @@ -23,7 +23,6 @@ void blsInit(void); blsId *blsIdCreate(void); void blsIdDestroy(blsId *id); -void blsIdPut(const blsId *id); // return 0 if success int blsIdSetStr(blsId *id, const char *buf, size_t bufSize); @@ -33,12 +32,16 @@ int blsIdSetStr(blsId *id, const char *buf, size_t bufSize); otherwise 0 */ size_t blsIdGetStr(const blsId *id, char *buf, size_t maxBufSize); - +/* + access p[0], p[1], p[2], p[3] +*/ void blsIdSet(blsId *id, const uint64_t *p); blsSecretKey* blsSecretKeyCreate(void); void blsSecretKeyDestroy(blsSecretKey *sec); void blsSecretKeyPut(const blsSecretKey *sec); +int blsSecretKeySetStr(blsSecretKey *sec, const char *buf, size_t bufSize); +size_t blsSecretKeyGetStr(const blsSecretKey *sec, char *buf, size_t maxBufSize); void blsSecretKeyInit(blsSecretKey *sec); void blsSecretKeyGetPublicKey(const blsSecretKey *sec, blsPublicKey *pub); @@ -47,10 +50,14 @@ void blsSecretKeySign(const blsSecretKey *sec, blsSign *sign, const char *m, siz blsPublicKey *blsPublicKeyCreate(void); void blsPublicKeyDestroy(blsPublicKey *pub); void blsPublicKeyPut(const blsPublicKey *pub); +int blsPublicKeySetStr(blsPublicKey *pub, const char *buf, size_t bufSize); +size_t blsPublicKeyGetStr(const blsPublicKey *pub, char *buf, size_t maxBufSize); blsSign *blsSignCreate(void); void blsSignDestroy(blsSign *sign); void blsSignPut(const blsSign *sign); +int blsSignSetStr(blsSign *sign, const char *buf, size_t bufSize); +size_t blsSignGetStr(const blsSign *sign, char *buf, size_t maxBufSize); int blsSignVerify(const blsSign *sign, const blsPublicKey *pub, const char *m, size_t size); |