Common encryption

Encryption: in the network transmission, if we expressly transmission, will be people to intercept, so data loss. We can encrypt them

Divided into two categories encryption, symmetric encryption and asymmetric encryption.

Symmetric encryption: Symmetric encryption is a public key encryption and decryption.

DES: symmetric encryption, fast, suitable for large data encrypted occasions.

{class DesUtil public 

Private Final the DES static String = "the DES";
Private Final the ENCODE static String = "UTF-. 8";

Private Final static byte [] = {1,2,3,4,5,6,7,8 ivByte };
// algorithm name / encryption mode / padding embodiment
public static String CIPHER_ALGORITHM = Final "the DES / the CBC / PKCS5Padding";

// fill mode mainly depends PKCS5Padding PKCS7Padding there are other ways to fill not used
// public static final String CIPHER_ALGORITHM_CBC = "the DES / the CBC / ZerosPadding";

public static void main (String [] args) throws Exception {
String Data = "123456";
String timeSend = "1536313412";
System.out.println (timeSend);
String apiKey = "5e29f483c48848 ";
String messageId="cdf5157133f64b409e69d60c4329bb72";
Key Md5Util.md5Hex = String (apiKey + + The messageId of timeSend);
the try {
String the encrypt the encrypt = (Data, key); // Data is data to be encrypted, key is a key.
System.out.println (the encrypt);
System.out.println (the decrypt (the encrypt, Key)); // this is the encrypt encrypted data, Key is the key.
The catch} (Exception E) {
e.printStackTrace ();
}

}
so that during transmission, the data we need to pass over, and after the key encryption together, as long as the intercepted ciphertext and the key, you can easily put decrypt the data.

/ **
* based on a key to encrypt the Description
* @param Data
* @param Key encryption key byte array
* @return
* @throws Exception
* /
public static String the encrypt (Data String, String Key) throws Exception {
byte[] bt = encrypt(data.getBytes(ENCODE), key.getBytes(ENCODE));
return new String(Base64.getEncoder().encode(bt));
}

/**
* Description 根据键值进行解密
* @param data
* @param key 加密键byte数组
* @return
* @throws IOException
* @throws Exception
*/
public static String decrypt(String data, String key) throws IOException,
Exception {
if (data == null)
return null;
byte[] buf = Base64.getDecoder().decode(data);
byte[] bt = decrypt(buf, key.getBytes(ENCODE));
return new String(bt, ENCODE);
}

/**
The encrypted key * Description
* @param Data
* @param Key encryption key byte array
* @return
* @throws Exception
* /
Private static byte [] the encrypt (byte [] Data, byte [] Key) throws Exception {

// initialization vector
IvParameterSpec IV = new new IvParameterSpec (ivByte);

// Create from original key data objects DESKeySpec
DESKeySpec DKS = new new DESKeySpec (key);

// Create a factory key, and then converts it into DESKeySpec SecretKey objects
SecretKeyFactory keyFactory = SecretKeyFactory.getInstance (the DES);
a SecretKey SecureKey = keyFactory.generateSecret (DKS);

// cipher object actually completed encryption
cipher cipher = Cipher.getInstance (CIPHER_ALGORITHM);

key cipher object is initialized with //
cipher.init (Cipher.ENCRYPT_MODE, SecureKey, IV);

return Cipher.doFinal (Data);
}

/ **
* based on a key to decrypt the Description
*
* @param Data
* @param Key encryption key byte array
* @return
* @ Exception throws
* /
Private static byte [] the decrypt (byte [] data, byte [] key) throws Exception {
// initialization vector
IvParameterSpec IV = new new IvParameterSpec (ivByte);

// Create from original key data objects DESKeySpec
DESKeySpec dks = DESKeySpec new new (key);

// Create a factory key, and then converts it into DESKeySpec SecretKey objects
SecretKeyFactory keyFactory = SecretKeyFactory.getInstance (DES);
SecureKey = keyFactory.generateSecret a SecretKey (DKS);

// Cipher object actually completed decryption
Cipher cipher = Cipher.getInstance (CIPHER_ALGORITHM);

// Cipher object is initialized with a key
cipher.init (Cipher.DECRYPT_MODE, SecureKey, IV);

return Cipher.doFinal (Data);
}
}
the AES encryption
public class AESUtil {

public static String PLAN_PASSWORD = "PLAN_PASSWORD";

public static String encrypt(String bef_aes, String password) {
byte[] byteContent = null;
try {
byteContent = bef_aes.getBytes("utf-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
return encrypt(byteContent,password);
}
public static String encrypt(byte[] content, String password) {
try {
SecretKey secretKey = getKey(password);
byte[] enCodeFormat = secretKey.getEncoded();
SecretKeySpec key = new SecretKeySpec(enCodeFormat, "AES");
Cipher cipher = Cipher.getInstance("AES");// 创建密码器
cipher.init(Cipher.ENCRYPT_MODE, key);// 初始化
byte[] result = cipher.doFinal(content);
String aft_aes = parseByte2HexStr(result);
return aft_aes; // 加密
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
} catch (NoSuchPaddingException e) {
e.printStackTrace();
} catch (InvalidKeyException e) {
e.printStackTrace();
} catch (IllegalBlockSizeException e) {
e.printStackTrace();
} catch (BadPaddingException e) {
e.printStackTrace();
}
return null;
}
public static String decrypt(String aft_aes, String password) {
try {
byte[] content = parseHexStr2Byte(aft_aes);
SecretKey secretKey = getKey(password);
byte[] enCodeFormat = secretKey.getEncoded();
SecretKeySpec key = new SecretKeySpec(enCodeFormat, "AES");
Cipher cipher = Cipher.getInstance("AES");// 创建密码器
cipher.init(Cipher.DECRYPT_MODE, key);// 初始化
byte[] result = cipher.doFinal(content);
String bef_aes = new String(result);
return bef_aes; // 加密
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
} catch (NoSuchPaddingException e) {
e.printStackTrace();
} catch (InvalidKeyException e) {
e.printStackTrace();
} catch (IllegalBlockSizeException e) {
e.printStackTrace();
} catch (BadPaddingException e) {
e.printStackTrace();
}
return null;
}
public static String parseByte2HexStr(byte buf[]) {
StringBuffer sb = new StringBuffer();
for (int i = 0; i < buf.length; i++) {
String hex = Integer.toHexString(buf[i] & 0xFF);
if (hex.length() == 1) {
hex = '0' + hex;
}
sb.append(hex.toUpperCase());
}
return sb.toString();
}
public static byte[] parseHexStr2Byte(String hexStr) {
if (hexStr.length() < 1)
return null;
byte[] result = new byte[hexStr.length()/2];
for (int i = 0;i< hexStr.length()/2; i++) {
int value = Integer.parseInt(hexStr.substring(i*2, i*2+2), 16);
result[i] = (byte)value;
}
return result;
}
public static SecretKey getKey(String strKey) {
try {
_Generator = KeyGenerator.getInstance the KeyGenerator ( "the AES");
a SecureRandom secureRandom = SecureRandom.getInstance ( "SHA1PRNG");
secureRandom.setSeed (strKey.getBytes ());
_generator.init (128, secureRandom);
return _generator.generateKey () ;
} the catch (exception E) {
the throw a RuntimeException new new ( "exception occurs initialization key");
}
}
}
test classes:
String content = "9606b072a2d54f68a873684c288df9c9|10000002";
String password = "12345678";
// 加密
System.out.println("加密前:" + content);
String str = AESUtil.encrypt(content, AESUtil.PLAN_PASSWORD);
System.out.println("加密后:"+str);
S1 = AESUtil.decrypt String (STR, AESUtil.PLAN_PASSWORD); 
System.out.println ( "decrypted:" + S1);

the MD5 encryption:
The encryption is irreversible
public final class Md5Util {

public static String md5Hex(String data) {
try {
StringBuffer sb = new StringBuffer();
MessageDigest digest = MessageDigest.getInstance("MD5");
digest.update(data.getBytes());
byte b[] = digest.digest();
int i;
for (int offset = 0; offset < b.length; offset++) {
i = b[offset];
if (i < 0)
i += 256;
if (i < 16)
sb.append("0");
sb.append(Integer.toHexString(i));
}
return sb.toString();
} catch (NoSuchAlgorithmException e) {
e.printStackTrace ();
}
return null;
}
}

asymmetric cryptography: encryption and decryption is the same key is not used, usually with two, one private and one public must be paired, generally a public key is an open, encrypted. The private key is not publicly
is used to decrypt.
RSA encryption, are now commonly used in 2048.
public class RSA2048Utils {
public static final String KEY_ALGORITHM = "RSA";
public static final String SIGNATURE_ALGORITHM = "SHA256withRSA";
public static final int KEY_SIZE = 2048;
public static String PUBLIC_KEY ="publicKey";
public static String PRIVATE_KEY = "privateKey";
private static final int MAX_ENCRYPT_BLOCK = 245;
private static final int MAX_DECRYPT_BLOCK = 256;

public RSA2048Utils() {
}

public static Map<String, Object> genKeyPair() throws Exception {//该方法是生成一对公私钥
KeyPairGenerator keyPairGen = KeyPairGenerator.getInstance(KEY_ALGORITHM);
keyPairGen.initialize(KEY_SIZE, new SecureRandom());
KeyPair keyPair = keyPairGen.generateKeyPair();
RSAPublicKey publicKey = (RSAPublicKey)keyPair.getPublic();
RSAPrivateKey privateKey = (RSAPrivateKey)keyPair.getPrivate();
Map<String, Object> keyMap = new HashMap(2);
keyMap.put(PUBLIC_KEY, publicKey);
keyMap.put(PRIVATE_KEY, privateKey);
return keyMap;
}

public static String privateKeySign(String dataStr,String privateKey) throws Exception {
byte[] data = (new BASE64Decoder()).decodeBuffer(dataStr);
RSAPrivateKey privateKeyRsa = loadPrivateKey(privateKey);
Signature signature = Signature.getInstance(SIGNATURE_ALGORITHM);
signature.initSign(privateKeyRsa);
signature.update(data);
return (new BASE64Encoder()).encodeBuffer(signature.sign());
}

public static boolean publicKeyVerify(String dataStr, String sign,String publicKey) throws Exception {
byte[] data = (new BASE64Decoder()).decodeBuffer(dataStr);
RSAPublicKey publicKeyRsa = loadPublicKey(publicKey);
Signature signature = Signature.getInstance(SIGNATURE_ALGORITHM);
signature.initVerify(publicKeyRsa);
signature.update(data);
return signature.verify((new BASE64Decoder()).decodeBuffer(sign));
}

public static byte[] decryptByPrivateKey(byte[] encryptedData, RSAPrivateKey privateKeyRsa) throws Exception {
if (privateKeyRsa == null) {
throw new Exception("解密私钥为空,请设置");
} else {
try {
Cipher cipher = Cipher.getInstance("RSA");
cipher.init(2, privateKeyRsa);
return partitionAlgorithm(encryptedData, cipher, MAX_DECRYPT_BLOCK);
} catch (NoSuchAlgorithmException var3) {
throw new Exception("无此解密算法");
} catch (NoSuchPaddingException var4) {
var4.printStackTrace();
return null;
The catch} (InvalidKeyException var5) {
the throw new new Exception ( "illegally decrypt the private key, check");
} the catch (IllegalBlockSizeException var6) {
the throw new new Exception ( "ciphertext illicit");
} the catch (BadPaddingException Var7) {
the throw new new Exception ( "ciphertext data is corrupted");
}
}
}

public static byte [] decryptByPublicKey (byte [] encryptedData, RSAPublicKey publicKeyRsa) throws Exception {
IF (publicKeyRsa == null) {
the throw new new Exception ( "decrypted public key blank , set ");
} {the else
the try {
the cipher cipher = Cipher.getInstance (" the RSA ");
cipher.init(2, publicKeyRsa);
partitionAlgorithm return (encryptedData, cipher, MAX_DECRYPT_BLOCK);
} the catch (NoSuchAlgorithmException var3) {
the throw new new Exception ( "no such decryption algorithm");
} the catch (a NoSuchPaddingException var4) {
var4.printStackTrace ();
return null;
} the catch (InvalidKeyException var5 ) {
the throw new new Exception ( "illegal decryption public key, check");
} the catch (IllegalBlockSizeException var6) {
the throw new new Exception ( "ciphertext illicit");
} the catch (BadPaddingException Var7) {
the throw new new Exception ( "ciphertext data is corrupted ");
}
}
}

public static byte[] encryptByPublicKey(byte[] data, RSAPublicKey publicKeyRsa) throws Exception {
if (publicKeyRsa == null) {
throw new Exception("加密公钥为空,请设置");
} else {
try {
Cipher cipher = Cipher.getInstance("RSA");
cipher.init(1, publicKeyRsa);
return partitionAlgorithm(data, cipher, MAX_ENCRYPT_BLOCK);
} catch (NoSuchAlgorithmException var3) {
throw new Exception("无此加密算法");
} catch (NoSuchPaddingException var4) {
var4.printStackTrace();
return null;
} catch (InvalidKeyException var5) {
throw new Exception ( "illegal public key encryption, check");
} the catch (IllegalBlockSizeException var6) {
throw new Exception ( "plaintext illegal length");
} the catch (BadPaddingException Var7) {
throw new Exception ( "plaintext data is corrupted." );
}
}
}

public static byte [] encryptByPrivateKey (byte [] Data, RSAPrivateKey The privateKeyRsa) throws Exception {
IF (privateKeyRsa == null) {
the throw new new Exception ( "encrypted private key is empty, set");
} the else {
{the try
the cipher cipher = Cipher.getInstance ( "the RSA");
cipher.init (. 1, privateKeyRsa);
partitionAlgorithm return (Data, cipher, MAX_ENCRYPT_BLOCK);
} the catch (NoSuchAlgorithmException var3) {
the throw new new Exception ( "no such Encryption Algorithm");
} the catch (a NoSuchPaddingException var4) {
var4.printStackTrace ();
return null;
} the catch (InvalidKeyException var5 ) {
the throw new new Exception ( "illegal encryption private key, check");
} the catch (IllegalBlockSizeException var6) {
the throw new new Exception ( "plaintext illegal length");
} the catch (BadPaddingException Var7) {
the throw new new Exception ( "plaintext data is damage ");
}
}
}

public static byte[] partitionAlgorithm(byte[] data, Cipher cipher, int maxBlock) throws IOException, BadPaddingException, IllegalBlockSizeException {
int inputLen = data.length;

try {
ByteArrayOutputStream out = new ByteArrayOutputStream();
Throwable var5 = null;

byte[] var10;
try {
int offSet = 0;

for(int i = 0; inputLen - offSet > 0; offSet = i * maxBlock) {
byte[] cache;
if (inputLen - offSet > maxBlock) {
cache = cipher.doFinal(data, offSet, maxBlock);
} else {
cache = cipher.doFinal(data, offSet, inputLen - offSet);
}

out.write(cache, 0, cache.length);
++i;
}

byte[] encryptedData = out.toByteArray();
var10 = encryptedData;
} catch (Throwable var20) {
var5 = var20;
throw var20;
} finally {
if (out != null) {
if (var5 != null) {
try {
out.close();
} catch (Throwable var19) {
var5.addSuppressed(var19);
}
} else {
out.close();
}
}

}

return var10;
} catch (IllegalBlockSizeException | IOException | BadPaddingException var22) {
throw var22;
}
}

public static String getPrivateKey(Map<String, Object> keyMap) throws Exception {
Key key = (Key)keyMap.get(PRIVATE_KEY);
return (new BASE64Encoder()).encodeBuffer(key.getEncoded());
}

public static String getPublicKey(Map<String, Object> keyMap) throws Exception {
Key key = (Key)keyMap.get(PUBLIC_KEY);
return (new BASE64Encoder()).encodeBuffer(key.getEncoded());
}

public static RSAPublicKey loadPublicKey(String publicKeyStr) throws Exception {
try {
BASE64Decoder base64Decoder = new BASE64Decoder();
byte[] buffer = base64Decoder.decodeBuffer(publicKeyStr);
KeyFactory keyFactory = KeyFactory.getInstance(KEY_ALGORITHM);
X509EncodedKeySpec keySpec = new X509EncodedKeySpec(buffer);
return (RSAPublicKey)keyFactory.generatePublic(keySpec);
} catch (NoSuchAlgorithmException var5) {
throw new Exception("无此算法");
The catch} (InvalidKeySpecException var6) {
the throw new new Exception ( "Public Key illicit");
} the catch (IOException Var7) {
the throw new new Exception ( "public key data content read error");
} the catch (a NullPointerException var8) {
the throw new new Exception ( "empty public key");
}
}

public static RSAPrivateKey The loadPrivateKey (String privateKeyStr) throws Exception {
the try {
Base64Decoder Base64Decoder new new Base64Decoder = ();
byte [] = base64Decoder.decodeBuffer Buffer (privateKeyStr);
PKCS8EncodedKeySpec with new new PKCS8EncodedKeySpec with keySpec = (Buffer);
the KeyFactory KeyFactory = KeyFactory.getInstance (KEY_ALGORITHM);
return (RSAPrivateKey The) keyFactory.generatePrivate (keySpec);
} the catch (NoSuchAlgorithmException var5) {
the throw new new Exception ( "no such algorithm");
} the catch (InvalidKeySpecException var6) {
var6.printStackTrace ();
the throw new new Exception ( "private Illegal ");
} the catch (IOException Var7) {
the throw new new Exception (" private data content read error ");
} the catch (a NullPointerException var8) {
the throw new new Exception (" private data is empty ");
}
}

public static String decryptPrivateWithBase64 (String base64String, privateKey String) throws Exception {
RSAPrivateKey The privateKeyRsa = loadPrivateKey (privateKey);
byte[] binaryData = decryptByPrivateKey((new BASE64Decoder()).decodeBuffer(base64String), privateKeyRsa);
String string = new String(binaryData);
return string;
}

public static String encryptPublicWithBase64(String string,String publicKey) throws Exception {
RSAPublicKey publicKeyRsa = loadPublicKey(publicKey);
byte[] binaryData = encryptByPublicKey(string.getBytes("utf-8"), publicKeyRsa);
String base64String = (new BASE64Encoder()).encodeBuffer(binaryData);
return base64String;
}

public static String decryptPublicWithBase64(String base64String,String publicKey) throws Exception {
RSAPublicKey publicKeyRsa = loadPublicKey(publicKey);
byte[] binaryData = decryptByPublicKey((new BASE64Decoder()).decodeBuffer(base64String), publicKeyRsa);
String string = new String(binaryData);
return string;
}

public static String encryptPrivateWithBase64(String string,String privateKey) throws Exception {
RSAPrivateKey privateKeyRsa = loadPrivateKey(privateKey);
byte[] binaryData = encryptByPrivateKey(string.getBytes("utf-8"), privateKeyRsa);
String base64String = (new BASE64Encoder()).encodeBuffer(binaryData);
return base64String;
}

public static void main(String[] args) throws Exception {
     PublicKey = String "xxxxxxxxxxxxxxxxxxxxxx";
     String Data = "xxxxxxxxxxxxxxxxxxxx";
     encryptPublicWithBase64 (Data, publicKey); // for public key encryption
String privateKey = "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCcVRBdx/3PbT4A3l+X3SvO39KLthjMI/QmN3yR0ON9eY+FeHUpA5DYea2/ziIR4SYaYcmSISTcCuTOJgByc/Ha1LNSwN8H7+MbZcG7+GKJCBlF7YSbSyiinRDTqEYnTwZ7gsUvEmRH/GDy27svuw9XeRgRGcjas8+dEj3RHuzyLCtVD3eXGIBZPI5/ERuC8vMCNFl8hDp1B4fgh2JZykaEHD8erYg4mBW+Sf8d1gn4mw5gMEyyzj7S3+otJ4+US3eENDVc7dIvrRz9K44dYpxTK/S1Rp+1nzx5M12ZsSS5tvqmbeiSwvA0nBwvVIvWcweI5hzqBBIIa6qAOLCe1BmFAgMBAAECggEBAJkhjaV/F7PN+vUY3aRBBf9fKLqnhUS5Vxb0NPYUGjG3GAmSQ5kIICKblcESpjbDRvKCpNKZ2qQbm6H+gWObBOXogTrnJ9B7fwdANnPsSoCVyUPA86q2BTi8B1Z8NzOb6eqj3ohMSKRmp4RcDdAkOFPjjtp5WlA3336o9ppX45sWdvPEPMjSholHvC6w1qAMhCz+/+oFfnem9GvtdoxENb8kjY3Y8GMzGDtWU2mBTIpSPBuo0+LTpkvTSxa2/YIApHi00CqTsdlonQiNktay50FBc0rlEtwMTYRG9jyUZWhjQdyedV8hRA2e02pV7aszPrTw/loKjDB0JmGX6LiZxSUCgYEAyNOtbXqkjhQPZrKUU+j03giM8DR6oLmFxM8yBI6Gpqovi0cYeMJYTYjb0vFO4g5TGGTYbpdP+OZ8TCS+Gnpb7l/dRYeaYTPjeUQ+JjqydI89IoEB1gPNzsByMbz76RoG584blSJ0izmSH + T + EflAv1Ttdr29hXQ9GxltV9GS + zsCgYEAx0gLfznfwKFXrRIt0rAuKqGU41dmq8XclLq3w8Gkdx4zC57 + IqOQrYhCf6X1iRGUCQ1YOnOQEgcRyXfujQ9ycWWbi1iN / kTGgd9ylBb4R56iviLM6wdPF2oSiIurF4PBFbRs + QgkHE1xxOcJ + iL + / 6jH1CUN0jDTxgAN3 / rYcj8CgYBzuKYCo90WkbCeOOEHyQDwwHSWJWdUHhNa6RmlTouAlih3VSxgyXwgkXA6CRqvYBm5wMKGV2KZxhZxuephT4iRv2O9oPnwcPnu8sftN32FdNSBgV0ReXeqX3Jt / rwaAglgoX97XDNT1oTBJC7TJJGOrt12wrbmo6hiaTB8niLX6QKBgDnN + hfDb9XudwIq3cPZeuq + x / NR7OQylpNFvfw4dT5gMipSyiC + FT9g4Pkp6JkD0k714fvCfa3dAxnPghDExEuET6QR4c45oOMXL6MpLoeHymkgqxQZoKWIDSwyZ0SA4UcseNebtu3GwRN + ePRnplP + X0h4HxQzOZqbdWrc1l / 9AoGBAJ4u1ASDy6Dgc7Vkf7Fr4mc + FpajA / 1oU43z4VPFt9S65Q4pdy9uKBZspWEbSD + jZy54Pi6b + 0qhxLmpRDM4nD4GeDSWbySBERSrI4yRTKc8eon4h18IeNfklbGT3dJ6llV / kJxFUKAcyct + IfW29LeTXUYNiq6dCA / Y8gZdF6Mj " ;
String resultData = "Y0JPwMJn1dVqnZNCxPouzHUiir8OOtuofa39Z5dqzv7IpHajbkH / EU / R8qPJ + wjg4UlHEFuCJec0xUpiGnTB6AsNDOACsv6aS3DdXfw7FVeMFSqgjsk5NVm YQNgldtf + + + tLWmlBcIu2ASvJ0B8rN5E1LxPhFC4cSN5752q ObAeUDxZZkihqRmqsQkTZlDlLhvWtvZktbgvyjUcVqw001jiVYSczK1TlgCsBPvhAt / r3 / xuTnlXzlnGFAxlwTESeIHzSUywPpllJkoGHpdXRhMhobRPSgYRxiHp / UGpk70M0xkI1DogIiJRoavIY5WGqkNS0X8VLkUgn2hqgvA / 4oEKQsVVbiXhgK42DmBcaRSJJ48GrKH / 1L8C3RHAJIAHaFEvFxwakt7ORFl9HAvJK / KNTDPPsAPqZPlAcxUtI5ffTD7hkewtmkmALkuacM / 7R / Tpcm3NJcWZmhZi6iOgyr1I3xQibW3913ShvgT4AhWBRSwtiTJCVugOzb3RJFa1tYf6a 3LHiy4 + / + oCfUdZ95cfqCCnVdRpfhWzpBYq6 xvl17 w5CTSeVzh4zL7RiSLPoXwB + / + iauy3AP qj1rw / oEBGiNNdUOtqhtt5ma70pf6p / ++ EQZJH / pykqaFn94qToQX32wk5eZz4CnQHlYQGG / S5qdPHWPn880XaNe0ZqksBHXib6Uw9JOvNX6TPmjWQ3s / qfvsZz 9xa42T7jam7EtTMdHW4FdKZbBK + + + fcexq7PDHDbxoU XyJLqZdjz9N2BYdX9R537psWhCgNA4NwH4kkjsq6nyl wHlaHtdpexrZTa7jn2kkISjrvPdU71 + / + jBp33ayyalPs3zjGrUi Q9RLyDCV3+G5CvHgHEoEuE713fVZA0cGwzaYAOHDK/etGfBK0BO8uaOw3mIDNWcfKEmAIy+NrcxmVwSTAgKPAN49JTmjYLFQRrByaRxX2mum2peEfgjgRW05TiwZ6ySOa48hVS/oMEwA4BOmT4hVX5ajRHYjVvKIUxYh3kZah6+dOMqT01t/DzOion5cB+Y3wqGAG0jmozmxhsjMlt/8U3F3KD82ytCcA8iFAvHaRw5CPXZQaKIn7MU6yI69hln8QFWoUP9x0/XI2/uT6B4MxlzPag0yIkqQLLinKskQ/uVz1vODR5fZEqkya82/JMuhbYCmUFEUgJMFz95P+Mu8dI5Da1bXj2YDXHkVdHw4ymaBt8FXTs1tbmKsxJr/UW8n8X2HRtveeMzLSfcd/Mv4Mcfimax5CXGXEd106ZZu1DrB3MuMP/oBgYJ3ijl6s4/6JdvbVrN7VgzDdybC6WepD2GSBKG9aS8nt6K3jpsYTvCJhTLNsgCeAhLiI3zlRVB/TnGvBwaHQy9vks79FsW58eSHW8zNAAimjZp/zHCpL1rX/MLfZDwsTJwP1f3Ig+k5ZjMLjJ3WKaTmP9Lu4+9NYL2PwfJANF1X7Gs/slqpnMASczccubAB8EpNh4B2vpVPxWMo/WLGgT0o783FvHhpB2hiUJgWpmjYcTi72HL/R09XgdexJLXMbn4SS3v39m3LFPL+dlADFt5GMs/PlvgIjOwyV7EROf4JPGS9fQTPp/1xqidr+J/2Q+2IHM5Yy8b84esNSUyExyOYIg4Gp442yS8cCZKEBb/qX/E+6UJLSEhAvZXpospJDu9+XJp+PLPGtUspNf5U70I8MnM9YXhPXerI=";
System.out.println ( "-------- >>>" + decryptPrivateWithBase64 (resultData, privateKey)); // for private key to decrypt

}
}

Guess you like

Origin www.cnblogs.com/echo777/p/11776935.html