-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
不能正确处理空白符(空格、回车符等) #2
Comments
Closed
感谢反馈! |
空格问题已于1.1.1版本修复。确实是由于进行了过滤。 关于待处理字符串中出现换行的说明值得一提的是,由于算法是按位的,所以在处理不同系统中的换行时,需要区分 [
["a\na"=>'c413edbaa5449ada676857e243ae8d66401d82474cc68c243950178280bf7ae0'],
["a\ra"=>'75056f768d1ac970ef2faf58ae4be4666afc157e2cb87b9e08c526463bf787da'],
["a\r\na"=>'d1041bb570f8c65e26299159e41e21961d0ce4b79a285ee32c75c11eab0a2dd7']
] 其中,Linux(\n)下的值,与苍墨安全中的计算结果相同。 Windows(\r\n)下、OS X(\n)下和Classic Mac(\r)无对照结果,暂时未测试,欢迎反馈。 @cblk 再次感谢反馈! |
DongyunLee
added a commit
that referenced
this issue
Jul 6, 2020
DongyunLee
added a commit
that referenced
this issue
Jul 6, 2020
* 移除了配置文件 * 移除了\SM3\types\ASCII类 * 按照PSR-12重新整理了项目
合并了pr #3 ,感谢贡献! |
1.1.2已 发版,感谢贡献! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
问题描述
当输入包含whitespace时,得到的结果和openssl(1.1.1d 10 Sep 2019)不同
复现
执行如下代码:
结果:
1076807302544460b26944d7756a067bd4e135e2076889e86d62db5b5a10c867
对比openssl
执行:
openssl dgst -sm3 test.txt
结果:
SM3(test.txt)= d6ef141c5faa9bbde67cbc9f45988d6158eaf0bc2ab492bb489a6524ca492cbc
对比在线工具
另一个在线工具的例子(http://aks.jd.com/tools/sec/):
环境 :
The text was updated successfully, but these errors were encountered: