aboutsummaryrefslogtreecommitdiffstats
path: root/src/bls_if.cpp
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <herumi@nifty.com>2017-05-30 21:50:29 +0800
committerMITSUNARI Shigeo <herumi@nifty.com>2017-05-30 21:50:29 +0800
commitc79481e4e0f216fec35c9095bb4f425a9ea36edc (patch)
tree2fe0e3ac1b4a95e5bce68e75f53e34f959d3d96c /src/bls_if.cpp
parent1e9a0d8c358e868a07341530a55c4d07842dabe8 (diff)
downloaddexon-bls-c79481e4e0f216fec35c9095bb4f425a9ea36edc.tar
dexon-bls-c79481e4e0f216fec35c9095bb4f425a9ea36edc.tar.gz
dexon-bls-c79481e4e0f216fec35c9095bb4f425a9ea36edc.tar.bz2
dexon-bls-c79481e4e0f216fec35c9095bb4f425a9ea36edc.tar.lz
dexon-bls-c79481e4e0f216fec35c9095bb4f425a9ea36edc.tar.xz
dexon-bls-c79481e4e0f216fec35c9095bb4f425a9ea36edc.tar.zst
dexon-bls-c79481e4e0f216fec35c9095bb4f425a9ea36edc.zip
use setHashOf
Diffstat (limited to 'src/bls_if.cpp')
-rw-r--r--src/bls_if.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bls_if.cpp b/src/bls_if.cpp
index 192a45d..2498759 100644
--- a/src/bls_if.cpp
+++ b/src/bls_if.cpp
@@ -143,8 +143,8 @@ size_t blsSecretKeyGetHexStr(char *buf, size_t maxBufSize, const blsSecretKey *s
int blsSecretKeySetToHashOf(blsSecretKey *sec, const void *buf, size_t bufSize)
try
{
- std::string s = mcl::fp::hash(384, (const char *)buf, bufSize);
- return blsSecretKeySetLittleEndian(sec, s.c_str(), s.size());
+ ((bls::SecretKey*)sec)->setHashOf(buf, bufSize);
+ return 0;
} catch (std::exception& e) {
fprintf(stderr, "err blsSecretKeySetByCSPRNG %s\n", e.what());
return -1;