-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
Hutool SmUtil 中对SM4算法的实现 对GraalVM不友好 #2825
Labels
Comments
我其实在想,要不要重构 smutil,一了百了,越过 jce,直接调用 bc 库的算法引擎类实现一版国密算法工具类🤔这样所有由 jce provider 引发的问题就都解决掉了。 |
没想象的那么简单,毕竟bc库还是要注入Provider |
仅仅国密系列这几个算法实现的话,应该是可以完全绕过 JCE 的,核心就是几个纯算法 Engine 类,不需要外部依赖,就是写起来可能稍微繁琐些,我回头有时间整理一下试试看 |
你可以试试,我当初尝试过,不太行 |
其实Hutool的所有算法都是依赖于JCE的,这个暂时无解。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
版本情况
JDK版本: GraalVM CE 22.3.0 with Open JDK 19.0.1
hutool版本: 5.8.10
问题描述(包括截图)
当用户需要使用SM4算法并用GraalVM编译后会提示 BC Provider未注册,但其实BC Provider已成功注册,因为由SmUtil封装的SM2,SM3算法均可正常使用。
![image](https://user-images.githubusercontent.com/22979223/209309235-0055a1cc-e3f6-42f5-ae9f-92e2135e5ab2.png)
原谅鄙人没有能力进行PR,改进参考:
该Util内容源自于网上,此issue旨在为那些有需要在GraalVM上使用SM4的朋友少走一点弯路。
The text was updated successfully, but these errors were encountered: