diff options
author | MITSUNARI Shigeo <herumi@nifty.com> | 2018-10-28 14:20:12 +0800 |
---|---|---|
committer | MITSUNARI Shigeo <herumi@nifty.com> | 2018-10-28 14:20:12 +0800 |
commit | 5f2112059cb6326f03e1ac5585b1df1bb6fdc55f (patch) | |
tree | bd63f32e9061849e86ec95c420b7f759c75bafb5 /include/bls | |
parent | 994b575d1aba98ec664155407c24d2cb33a15140 (diff) | |
download | dexon-bls-5f2112059cb6326f03e1ac5585b1df1bb6fdc55f.tar dexon-bls-5f2112059cb6326f03e1ac5585b1df1bb6fdc55f.tar.gz dexon-bls-5f2112059cb6326f03e1ac5585b1df1bb6fdc55f.tar.bz2 dexon-bls-5f2112059cb6326f03e1ac5585b1df1bb6fdc55f.tar.lz dexon-bls-5f2112059cb6326f03e1ac5585b1df1bb6fdc55f.tar.xz dexon-bls-5f2112059cb6326f03e1ac5585b1df1bb6fdc55f.tar.zst dexon-bls-5f2112059cb6326f03e1ac5585b1df1bb6fdc55f.zip |
add blsSetRandFunc
Diffstat (limited to 'include/bls')
-rw-r--r-- | include/bls/bls.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/bls/bls.h b/include/bls/bls.h index 6b7cbdd..48ad855 100644 --- a/include/bls/bls.h +++ b/include/bls/bls.h @@ -184,6 +184,15 @@ BLS_DLL_API int blsHashToSecretKey(blsSecretKey *sec, const void *buf, mclSize b return 0 if success else -1 */ BLS_DLL_API int blsSecretKeySetByCSPRNG(blsSecretKey *sec); +/* + set user-defined random function for setByCSPRNG + @param self [in] user-defined pointer + @param readFunc [in] user-defined function, + which writes random bufSize bytes to buf and returns bufSize if success else returns 0 + @note if self == 0 and readFunc == 0 then set default random function + @note not threadsafe +*/ +BLS_DLL_API void blsSetRandFunc(void *self, unsigned int (*readFunc)(void *self, void *buf, unsigned int bufSize)); #endif BLS_DLL_API void blsGetPop(blsSignature *sig, const blsSecretKey *sec); |