diff options
| author | MITSUNARI Shigeo <herumi@nifty.com> | 2019-03-07 16:56:50 +0800 | 
|---|---|---|
| committer | MITSUNARI Shigeo <herumi@nifty.com> | 2019-03-07 16:56:50 +0800 | 
| commit | 5cd3c9f9b48cb79a6bcb4104cd5646973d94e3db (patch) | |
| tree | 41d49fa02f1443727b7d6fdb7970c9605ab592b3 /include/mcl | |
| parent | 4297ea0deae5253699b0cd6cc8b6e3eec0c3a3b2 (diff) | |
| download | tangerine-mcl-5cd3c9f9b48cb79a6bcb4104cd5646973d94e3db.tar.gz tangerine-mcl-5cd3c9f9b48cb79a6bcb4104cd5646973d94e3db.tar.zst tangerine-mcl-5cd3c9f9b48cb79a6bcb4104cd5646973d94e3db.zip  | |
add mclBnFp_{set,get}Str
Diffstat (limited to 'include/mcl')
| -rw-r--r-- | include/mcl/bn.h | 2 | ||||
| -rw-r--r-- | include/mcl/impl/bn_c_impl.hpp | 8 | 
2 files changed, 10 insertions, 0 deletions
diff --git a/include/mcl/bn.h b/include/mcl/bn.h index 0044d9d..2ea72ac 100644 --- a/include/mcl/bn.h +++ b/include/mcl/bn.h @@ -208,6 +208,7 @@ MCLBN_DLL_API int mclBnFr_setStr(mclBnFr *x, const char *buf, mclSize bufSize, i  MCLBN_DLL_API int mclBnG1_setStr(mclBnG1 *x, const char *buf, mclSize bufSize, int ioMode);  MCLBN_DLL_API int mclBnG2_setStr(mclBnG2 *x, const char *buf, mclSize bufSize, int ioMode);  MCLBN_DLL_API int mclBnGT_setStr(mclBnGT *x, const char *buf, mclSize bufSize, int ioMode); +MCLBN_DLL_API int mclBnFp_setStr(mclBnFp *x, const char *buf, mclSize bufSize, int ioMode);  /*  	buf is terminated by '\0' @@ -217,6 +218,7 @@ MCLBN_DLL_API mclSize mclBnFr_getStr(char *buf, mclSize maxBufSize, const mclBnF  MCLBN_DLL_API mclSize mclBnG1_getStr(char *buf, mclSize maxBufSize, const mclBnG1 *x, int ioMode);  MCLBN_DLL_API mclSize mclBnG2_getStr(char *buf, mclSize maxBufSize, const mclBnG2 *x, int ioMode);  MCLBN_DLL_API mclSize mclBnGT_getStr(char *buf, mclSize maxBufSize, const mclBnGT *x, int ioMode); +MCLBN_DLL_API mclSize mclBnFp_getStr(char *buf, mclSize maxBufSize, const mclBnFp *x, int ioMode);  // set zero  MCLBN_DLL_API void mclBnFr_clear(mclBnFr *x); diff --git a/include/mcl/impl/bn_c_impl.hpp b/include/mcl/impl/bn_c_impl.hpp index 4a78b0b..ab63ec9 100644 --- a/include/mcl/impl/bn_c_impl.hpp +++ b/include/mcl/impl/bn_c_impl.hpp @@ -544,6 +544,14 @@ void mclBn_verifyOrderG2(int doVerify)  	verifyOrderG2(doVerify != 0);  } +mclSize mclBnFp_getStr(char *buf, mclSize maxBufSize, const mclBnFp *x, int ioMode) +{ +	return cast(x)->getStr(buf, maxBufSize, ioMode); +} +int mclBnFp_setStr(mclBnFp *x, const char *buf, mclSize bufSize, int ioMode) +{ +	return setStr(x, buf, bufSize, ioMode); +}  mclSize mclBnFp_deserialize(mclBnFp *x, const void *buf, mclSize bufSize)  {  	return (mclSize)cast(x)->deserialize(buf, bufSize);  | 
