aboutsummaryrefslogtreecommitdiffstats
path: root/src/bls_c_impl.hpp
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <herumi@nifty.com>2019-03-08 20:59:21 +0800
committerMITSUNARI Shigeo <herumi@nifty.com>2019-03-08 20:59:21 +0800
commitb861a41edebe285168cbd2d06f41621d5ae36255 (patch)
tree93a0700ed19ba8436be26fd617ce18a7f631cc6f /src/bls_c_impl.hpp
parent5fcee19422f96902a5fdf9f29db427dd6fe9f16b (diff)
downloaddexon-bls-b861a41edebe285168cbd2d06f41621d5ae36255.tar
dexon-bls-b861a41edebe285168cbd2d06f41621d5ae36255.tar.gz
dexon-bls-b861a41edebe285168cbd2d06f41621d5ae36255.tar.bz2
dexon-bls-b861a41edebe285168cbd2d06f41621d5ae36255.tar.lz
dexon-bls-b861a41edebe285168cbd2d06f41621d5ae36255.tar.xz
dexon-bls-b861a41edebe285168cbd2d06f41621d5ae36255.tar.zst
dexon-bls-b861a41edebe285168cbd2d06f41621d5ae36255.zip
add blsSecretKeySetLittleEndianMod
Diffstat (limited to 'src/bls_c_impl.hpp')
-rw-r--r--src/bls_c_impl.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/bls_c_impl.hpp b/src/bls_c_impl.hpp
index 197c146..b38c1ad 100644
--- a/src/bls_c_impl.hpp
+++ b/src/bls_c_impl.hpp
@@ -163,6 +163,12 @@ int blsSecretKeySetLittleEndian(blsSecretKey *sec, const void *buf, mclSize bufS
cast(&sec->v)->setArrayMask((const char *)buf, bufSize);
return 0;
}
+int blsSecretKeySetLittleEndianMod(blsSecretKey *sec, const void *buf, mclSize bufSize)
+{
+ bool b;
+ cast(&sec->v)->setArray(&b, (const char *)buf, bufSize, mcl::fp::Mod);
+ return b ? 0 : -1;
+}
void blsGetPublicKey(blsPublicKey *pub, const blsSecretKey *sec)
{