jiaxingzheng / javascript-sm3 Goto Github PK
View Code? Open in Web Editor NEW国密SM3密码杂凑算法的JavaScript实现
国密SM3密码杂凑算法的JavaScript实现
在IE11下,提示SM3未定义错误
你好,进行测试发现,英文字母没问题,牵涉中文的摘要结果跟openssl和java语言的不对应,如下是样例:
const sm3 = require('sm3');
var data = '值';
var hash = sm3(data);
console.log("data: " + data);
console.log("hash: " + hash);
输出:
data: 值
hash: c3bc885bd7c84ddbf1c470cf172f43e68c61d7d1ee7c1b86527e2b408cd6ad08
java和openssl的结果:
71f68f1c12c91817e4379e4e0be0c2d6d86b40718db73b61b1d63e2bd350f368
计算helloworld sm3和 openssl计算的sm3 结果不一致。
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.