aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <herumi@nifty.com>2017-05-31 04:53:21 +0800
committerMITSUNARI Shigeo <herumi@nifty.com>2017-05-31 04:53:21 +0800
commit484e5a628ff25b9cfc8f6a46d60a0e855aef9b17 (patch)
treef205c0527c1b48155cec523e706c0ac6a28e8e1b
parent9424c218627d7fedc6722edd27de9f006e33583e (diff)
downloaddexon-bls-484e5a628ff25b9cfc8f6a46d60a0e855aef9b17.tar
dexon-bls-484e5a628ff25b9cfc8f6a46d60a0e855aef9b17.tar.gz
dexon-bls-484e5a628ff25b9cfc8f6a46d60a0e855aef9b17.tar.bz2
dexon-bls-484e5a628ff25b9cfc8f6a46d60a0e855aef9b17.tar.lz
dexon-bls-484e5a628ff25b9cfc8f6a46d60a0e855aef9b17.tar.xz
dexon-bls-484e5a628ff25b9cfc8f6a46d60a0e855aef9b17.tar.zst
dexon-bls-484e5a628ff25b9cfc8f6a46d60a0e855aef9b17.zip
rename blsHashToSecretKey
-rw-r--r--include/bls/bls_if.h2
-rw-r--r--src/bls_if.cpp4
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;
}