import org.apache.commons.codec.binary.Base64;
import javax.crypto.Cipher;
import java.security.Key;
import java.security.KeyFactory;
import java.security.spec.PKCS8EncodedKeySpec;
import java.security.spec.X509EncodedKeySpec;
/**
* RSA加解密工具类
* @Author zhang
* @Date 2019-04-19 15:11
*/
public class RSACoder {
public final static String PUBLIC_KEY = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCf2TH9BghW1Dps7cVVoE+Jb6AcnN8UseJ4XDSZ2C03UCciuPmoh97e5YYAWhOOO0h1JzYz55L3KClkqHy9Dqz3geHtKeAqNa71eWH/mKPbyVYFvpxwL/esUvY/4e9TZos8OLzjR5wVvUp03jBppbFXcpkgiQJ1hqofxdy8R97fhwIDAQAB";
public final static String PRIVATE_KEY = "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAJ/ZMf0GCFbUOmztxVWgT4lvoByc3xSx4nhcNJnYLTdQJyK4+aiH3t7lhgBaE447SHUnNjPnkvcoKWSofL0OrPeB4e0p4Co1rvV5Yf+Yo9vJVgW+nHAv96xS9j/h71Nmizw4vONHnBW9SnTeMGmlsVdymSCJAnWGqh/F3LxH3t+HAgMBAAECgYBp7j7BZkkKebSKUXwPxaBP/QiHTbJMfaIOj1RQi8FTQavdx+WzOO+KmWKXQxpojIL1GFpERXfQkO31he68P0iB5Uu+ASZbeBlObQ/FmUYTe8YyxUGMViCPrGccoP5uniCnaJnVy/DdJclO/8sjCpz1GL3PfeY2PsL+AwC0EjIV
java之RSA加解密工具类
最新推荐文章于 2024-07-17 14:16:50 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)