add ecdsaFree

dev
MITSUNARI Shigeo 7 years ago
parent 1bf7bbff64
commit 83b4ea2e22
  1. 2
      Makefile
  2. 8
      src/ecdsa_c.cpp

@ -267,7 +267,7 @@ endif
emcc -o $@ src/fp.cpp src/bn_c512.cpp $(EMCC_OPT) -DMCL_MAX_BIT_SIZE=512 -DMCL_USE_WEB_CRYPTO_API -s DISABLE_EXCEPTION_CATCHING=1
../ecdsa-wasm/ecdsa_c.js: src/ecdsa_c.cpp src/fp.cpp include/mcl/ecdsa.hpp include/mcl/ecdsa.h Makefile
emcc -o $@ src/fp.cpp src/ecdsa_c.cpp $(EMCC_OPT) -DMCL_MAX_BIT_SIZE=256
emcc -o $@ src/fp.cpp src/ecdsa_c.cpp $(EMCC_OPT) -DMCL_MAX_BIT_SIZE=256 -DMCL_USE_WEB_CRYPTO_API -s DISABLE_EXCEPTION_CATCHING=1
mcl-wasm:
$(MAKE) ../mcl-wasm/mcl_c.js

@ -16,6 +16,14 @@ static const Signature *cast(const ecdsaSignature *p) { return reinterpret_cast<
static PrecomputedPublicKey *cast(ecdsaPrecomputedPublicKey *p) { return reinterpret_cast<PrecomputedPublicKey*>(p); }
static const PrecomputedPublicKey *cast(const ecdsaPrecomputedPublicKey *p) { return reinterpret_cast<const PrecomputedPublicKey*>(p); }
#ifdef __EMSCRIPTEN__
// use these functions forcibly
extern "C" ECDSA_DLL_API void ecdsaFree(void *p)
{
free(p);
}
#endif
int ecdsaInit(void)
{
bool b;

Loading…
Cancel
Save