-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sm4-密钥为16位字符串 #26
Comments
目前这个插件,如果在sm.js 的1740行,重新设置key为一样的16位数组,最后加密串会是一样的。 如果不修改sm.js,需要在加签前,对key做兼容处理。 |
提前把16位的key,转成ascll码的16个长度的数组,即可。 |
需要将16位字符长度的key转成ascll码的16个长度的数组,如JeF8U9wHFOMfs2Y8,转化成 [74, 101, 70, 56, 85, 57, 119, 72, 70, 79, 77, 102, 115, 50, 89, 56] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
请问为什么key为16位字符串时报非法?
在线加/解密工具(https://the-x.cn/cryptography/Sm4.aspx)可以为16位字符串。
The text was updated successfully, but these errors were encountered: