diff options
author | MITSUNARI Shigeo <herumi@nifty.com> | 2017-05-31 04:53:21 +0800 |
---|---|---|
committer | MITSUNARI Shigeo <herumi@nifty.com> | 2017-05-31 04:53:21 +0800 |
commit | 484e5a628ff25b9cfc8f6a46d60a0e855aef9b17 (patch) | |
tree | f205c0527c1b48155cec523e706c0ac6a28e8e1b | |
parent | 9424c218627d7fedc6722edd27de9f006e33583e (diff) | |
download | tangerine-bls-484e5a628ff25b9cfc8f6a46d60a0e855aef9b17.tar.gz tangerine-bls-484e5a628ff25b9cfc8f6a46d60a0e855aef9b17.tar.zst tangerine-bls-484e5a628ff25b9cfc8f6a46d60a0e855aef9b17.zip |
rename blsHashToSecretKey
-rw-r--r-- | include/bls/bls_if.h | 2 | ||||
-rw-r--r-- | src/bls_if.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/include/bls/bls_if.h b/include/bls/bls_if.h index 2e81ad2..7a25b54 100644 --- a/include/bls/bls_if.h +++ b/include/bls/bls_if.h @@ -101,7 +101,7 @@ BLS_DLL_API size_t blsSecretKeyGetLittleEndian(void *buf, size_t maxBufSize, con /* hash buf and set */ -BLS_DLL_API int blsSecretKeySetToHashOf(blsSecretKey *sec, const void *buf, size_t bufSize); +BLS_DLL_API int blsHashToSecretKey(blsSecretKey *sec, const void *buf, size_t bufSize); /* set secretKey if system has /dev/urandom or CryptGenRandom return 0 if success else -1 diff --git a/src/bls_if.cpp b/src/bls_if.cpp index 2498759..d32740d 100644 --- a/src/bls_if.cpp +++ b/src/bls_if.cpp @@ -140,13 +140,13 @@ size_t blsSecretKeyGetHexStr(char *buf, size_t maxBufSize, const blsSecretKey *s return getStrT<bls::SecretKey, blsSecretKey>(sec, buf, maxBufSize, 16); } -int blsSecretKeySetToHashOf(blsSecretKey *sec, const void *buf, size_t bufSize) +int blsHashToSecretKey(blsSecretKey *sec, const void *buf, size_t bufSize) try { ((bls::SecretKey*)sec)->setHashOf(buf, bufSize); return 0; } catch (std::exception& e) { - fprintf(stderr, "err blsSecretKeySetByCSPRNG %s\n", e.what()); + fprintf(stderr, "err blsHashToSecretKey %s\n", e.what()); return -1; } |