RSA加密时报错:java.lang.ArrayIndexOutOfBoundsException: too much data for RSA bloc:
按照下面顺序先后进行:
1.RSA加密
2.Base64编码:
String password_front_end = Base64.getEncoder().encodeToString(encodeData);
3.Base64解码:
byte[] encodedPwd = Base64.getDecoder().decode(password_front_end );
4.RSA解密