Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

How to use security algorithms with jvm parameter -XX:+EnableCRIUSupport #2

Open
winwill2012 opened this issue Jun 12, 2023 · 0 comments

Comments

@winwill2012
Copy link

If I specify the jvm parameters -XX:+EnableCRIUSupport, the following code

MessageDigest.getInstance("MD5");

reports error:

Caused by: java.security.NoSuchAlgorithmException: MD5 MessageDigest not available
	at sun.security.jca.GetInstance.getInstance(GetInstance.java:159) ~[?:?]
	at java.security.MessageDigest.getInstance(MessageDigest.java:185) ~[?:?]
	at java.util.UUID.nameUUIDFromBytes(UUID.java:171) ~[?:?]
	... 21 more

and then I test following code snippet:

System.out.println("加载所有支持的算法");
for (Provider provider : Security.getProviders()) {
        System.out.println("Provider: " + provider.getName());
        for (Provider.Service service : provider.getServices()) {
                System.out.println("  Algorithm: " + service.getAlgorithm());
        }
}

when i specify the following jvm parameters:

-XX:+EnableCRIUSupport

the output is:
5bfbeaf93ef4dfd746c4eb4ba0f88972

when i remove the jvm parameters, the output is:
188184151e95eac98402ac7722797067

so, how to use these algorithms such as md5 with jvm parameter -XX:+EnableCRIUSupport ?

thanks

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant