From 5f2112059cb6326f03e1ac5585b1df1bb6fdc55f Mon Sep 17 00:00:00 2001 From: MITSUNARI Shigeo Date: Sun, 28 Oct 2018 15:20:12 +0900 Subject: add blsSetRandFunc --- include/bls/bls.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include') 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); -- cgit v1.2.3