RSA漏洞修复

使用默认随机填充算法报安全漏洞

 

 

修复方法:引入jar包

<dependency>

            <groupId>org.bouncycastle</groupId>

            <artifactId>bcprov-jdk15on</artifactId>

            <version>1.56</version>

</dependency>

 

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

Cipher cipher = Cipher.getInstance("RSA/None/OAEPWithSHA-1AndMGF1Padding");

posted on 2020-09-28 11:05  swustqiu  阅读(767)  评论(0编辑  收藏  举报

导航