添加Java Security Provider的两种方法

1.修改JDK的配置文件:%JDK_HOME%\jre\lib\security\java.security

//加上

security.provider.10=org.bouncycastle.jce.provider.BouncyCastleProvider

 

2.在代码里直接添加

Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.