From b861a41edebe285168cbd2d06f41621d5ae36255 Mon Sep 17 00:00:00 2001 From: MITSUNARI Shigeo Date: Fri, 8 Mar 2019 21:59:21 +0900 Subject: add blsSecretKeySetLittleEndianMod --- src/bls_c_impl.hpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') 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) { -- cgit v1.2.3