-
Notifications
You must be signed in to change notification settings - Fork 263
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
SM2加解密不支持ANS1(C1C3C2)格式 #118
Comments
用 ASN1.js 库编一下码就可以了,这个没啥标准不标准的,真实场景下裸 C1C3C2 反而用的更多。 |
ANS1格式还是有一些用的,SM2签名都支持ANS1格式,加密也可以支持一下嘛 |
大佬具体怎么弄,现在就是跟后端加密结果对不上了 |
参考下:dromara/hutool#3466 吧,原理不复杂,最近忙,估计没时间写 js 的示例 |
我搞出来了,测试没问题,提个pr大佬看看能用吗 |
参考的sm-crypto-v2 |
最好再加个这个 上次写邮件给作者提的问题:加密的字符串中包含引号时,解密操作无法成功完成 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
SM2加解密目前只支持C1C3C2、C1C2C3,而标准应该是ANS1(C1C3C2)
The text was updated successfully, but these errors were encountered: