📖 Abstract
Share today —
RSA encryption
request error:javax. Crypto. Badpaddingexception: decryption error
, welcome to pay attention!
Read related articles: spring boot + security based on the separation of the front and back RSA password encryption login process
🌂 resolvent
In the login method, the space can be replaced by a + sign, just ask if you want to be coquettish
String inputDecryptData = "";
try {
Object privateKey = redisUtil.get(Constant.RSA_PRIVATE_KEY);
inputDecryptData = RSAUtils.decrypt(password.replaceAll(" ","+"), RSAUtils.getPrivateKey(privateKey.toString()));
} catch (Exception e) {
log.error("RSA encryption and decryption exceptions occurred ======>", e);
throw new BizException("RSA encryption and decryption exception occurred");
}
Finally, thank you for watching patiently, leaving a like collection is your greatest encouragement to me!
Read More:
- from Crypto.Cipher import AES Error [How to Solve]
- [Solved] Git Error: client_global_hostkeys_private_confirm: server gave bad signature for RSA key 0
- [Solved] github Error: ERROR: You‘re using an RSA key with SHA-1
- Current request is not a multipart request [How to Solve]
- Eclipse Error: javax.servlet.annotation.WebFilter [Solved]
- Keytool: How to solve javax.net.ssl.SSLHandshakeException Error?
- [Solved] javax.management.InstanceNotFoundException: com.alibaba.druid:type=DruidDataSourceStat
- JSP error: The superclass “javax.servlet.http.HttpServlet” was not found on the Java Build Path
- Win assembleDebug Downloading gradle.zip Error: Exception in thread “main” java.lang.RuntimeException: javax.net.ssl.SSLExce
- XML read process error: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1] Message: Content not allowed in preamble
- How to Solve ERROR – unregister mbean error javax.management.InstanceNotFoundException: com.alibaba.druid:type=
- [Solved] Failed to bind properties under ‘spring.datasource.type‘ to java.lang.Class<javax.sql.DataSource>
- [Exception] javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: validity check failed
- [Solved] An error occurred while processing your request…enable the Development environment by setting …
- [Solved] nodejs Error: request entity too large
- Error (17) solves the problem of losing the request header of multithread asynchronous feign call
- [Solved] Chrome Error: The request client is not a secure context
- [How to Solve] java.lang.IllegalArgumentException: Request header is too large
- Axios request failed, get the status code and error information, how to encapsulate the function dealing with the public error code
- blackduck Error: Request failed authorization [HTTP Error]: XXX, response was 403 Forbidden.