aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <herumi@nifty.com>2018-06-05 10:42:05 +0800
committerMITSUNARI Shigeo <herumi@nifty.com>2018-06-05 10:42:05 +0800
commit10dbca28efbb826319408a4faf3be86942ccba3e (patch)
tree5257b827c1d522260fcf2d2f27a4c2ba9528e1c1
parentc4c1d4c1fede91f9d3bcf0761a1d5215b3efd9b1 (diff)
downloadtangerine-mcl-10dbca28efbb826319408a4faf3be86942ccba3e.tar.gz
tangerine-mcl-10dbca28efbb826319408a4faf3be86942ccba3e.tar.zst
tangerine-mcl-10dbca28efbb826319408a4faf3be86942ccba3e.zip
fix typo of macro
-rw-r--r--Makefile2
-rw-r--r--include/mcl/randgen.hpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 445d842..6e7d9f0 100644
--- a/Makefile
+++ b/Makefile
@@ -287,7 +287,7 @@ bin/emu:
# test
CLANG_WASM=-DNDEBUG -DMCLSHE_WIN_SIZE=8 -DCYBOZU_MINIMUM_EXCEPTION
CLANG_WASM+=-DMCL_SIZEOF_UNIT=8 -DMCL_MAX_BIT_SIZE=256
-CLANG_WASM+=-DCYBOZU_DONT_USE_EXCEPTION -DCYBOZU_DONT_USE_STRING -DMCL_DONT_USE_CSRPNG
+CLANG_WASM+=-DCYBOZU_DONT_USE_EXCEPTION -DCYBOZU_DONT_USE_STRING -DMCL_DONT_USE_CSPRNG
CLANG_WASM+=-O3 -Oz -target wasm32-wasm -fno-exceptions
CLANG_WASM+=-Wall -Wextra
CLANG_WASM+=-I./include -I../cybozulib/include -std=c++03
diff --git a/include/mcl/randgen.hpp b/include/mcl/randgen.hpp
index d5a2e95..4bfb30b 100644
--- a/include/mcl/randgen.hpp
+++ b/include/mcl/randgen.hpp
@@ -6,7 +6,7 @@
@license modified new BSD license
http://opensource.org/licenses/BSD-3-Clause
*/
-#ifdef MCL_DONT_USE_CSRPNG
+#ifdef MCL_DONT_USE_CSPRNG
// nothing
@@ -91,14 +91,14 @@ public:
{
readFunc_(self_, out, static_cast<uint32_t>(byteSize));
}
-#ifdef MCL_DONT_USE_CSRPNG
+#ifdef MCL_DONT_USE_CSPRNG
bool isZero() const { return false; } /* return false to avoid copying default rg */
#else
bool isZero() const { return self_ == 0 && readFunc_ == 0; }
#endif
static RandGen& get()
{
-#ifdef MCL_DONT_USE_CSRPNG
+#ifdef MCL_DONT_USE_CSPRNG
static RandGen wrg;
#elif defined(MCL_USE_WEB_CRYPTO_API)
static mcl::RandomGeneratorJS rg;