cubelrti / sm-crypto-v2 Goto Github PK
View Code? Open in Web Editor NEWThis project forked from juneandgreen/sm-crypto
国密算法 ts 版
License: MIT License
This project forked from juneandgreen/sm-crypto
国密算法 ts 版
License: MIT License
加密后保存成文件是源文件的两倍
我使用angular 12的版本,我在项目中安装了这个库,并按照README.md的使用方式编码,然后项目就起不来了
公司业务需要用到sm2门限密码,需要使用椭圆曲线参数进行计算,看了源码应该是没有实现门限密码方案的,希望能暴露出椭圆曲线相关的参数,感谢!
sm2加密在浏览器中运行正常,在NodeJS中运行报错:
throw new Error("random number pool is not ready or insufficient, prevent getting too long random values or too often.");
已复现:
1、发现是“async function initRNGPool() {” 初始化中用了异步,而我的方法调用时,一些初始化还没完成。
2、setTimeout延迟执行一下,就OK了
17:32:26.222 Invalid value "iife" for option "output.format" - UMD and IIFE output formats are not supported for code-splitting builds.
sm2加密在浏览器中运行正常,在NodeJS中运行报错:
throw new Error("random number pool is not ready or insufficient, prevent getting too long random values or too often.");
已复现:
1、发现是“async function initRNGPool() {” 初始化中用了异步,而我的方法调用时,一些初始化还没完成。
2、setTimeout延迟执行一下,就OK了
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.