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");

原文地址:https://www.cnblogs.com/qiuting/p/13743696.html