byte-fe / gm-crypto Goto Github PK
View Code? Open in Web Editor NEWA pure JavaScript implementation of GM/T series(sm2,sm3,sm4) cryptographic algorithms compatible with Node.js and browsers.
License: MIT License
A pure JavaScript implementation of GM/T series(sm2,sm3,sm4) cryptographic algorithms compatible with Node.js and browsers.
License: MIT License
sm2 解密 length为0
sm4中mode模式配置的sm2的cbc,前后台配置一样可以加解密还是必须使用sm4的?
是否能够支持更多的Padding类型,以及让用户自己选择Padding呢
因为我知道有一些应用不使用PKCS7
SM4 sm4 = new SM4(Mode.CBC, Padding.PKCS5Padding, HexUtil.decodeHex("0123456789abcdeffedcba9876543210"),HexUtil.decodeHex("0123456789abcdeffedcba9876543210"));
sm4.encryptHex("123456", CharsetUtil.CHARSET_UTF_8);
java 加密出来密文:
2cbf271326f69d779d666e2f72525d66
js 加密出来密文
96aa45e5a323a7b8224cc56ad1ba442f
两边加密123456 密文不一样
Portable.BouncyCastle,不知道差在哪里,希望大神指导下。c#加密,用gm-crypto解密,是空的,用gm-crypto加密用c#解密,解出来是乱码。
在参考示例中,sm4的mode配置使用了SM2.constants.CBC配置。但在实际运行中,这个SM2.constants.CBC是不存在的,配置了SM2.constants.CBC的sm4 cbc模式加解密生效了
sm4 加密的 key 可以支持 128位吗
RT
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.