import java.security.Key;
import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
public class a {
public static String a(String arg5) {
String v0 = null;
if(arg5 != null) {
try {
if(arg5.length() < 16) {
}
else {
SecretKeySpec v2 = new SecretKeySpec("1234567654321".getBytes("ASCII"), "AES");
Cipher v1 = Cipher.getInstance("AES/CBC/PKCS5Padding");
v1.init(2, ((Key)v2), new IvParameterSpec("443322110011".getBytes()));
byte[] v5 = a.a(arg5);
return new String(v1.doFinal(v5));
}
return v0;
}
catch(Exception ) {
return v0;
}
}
return v0;
}
public static byte[] a(String arg5) {
byte[] v0 = new byte[arg5.length() / 2];
int v1;
for(v1 = 0; v1 < arg5.length(); v1 += 2) {
int v3 = v1 / 2;
v0[v3] = ((byte)(arg5.charAt(v1) - 97 << 4));
v0[v3] = ((byte)(v0[v3] + (arg5.charAt(v1 + 1) - 97)));
}
return v0;
}
public static String a(byte[] arg3) {
StringBuffer v0 = new StringBuffer();
int v1;
for(v1 = 0; v1 < arg3.length; ++v1) {
v0.append(((char)((arg3[v1] >> 4 & 15) + 97)));
v0.append(((char)((arg3[v1] & 15) + 97)));
}
return v0.toString();
}
public static String b(String arg5) {
String v0 = null;
if(arg5 != null) {
try {
if(arg5.length() < 2) {
}
else {
SecretKeySpec v2 = new SecretKeySpec("1234567654321".getBytes(), "AES");
Cipher v1 = Cipher.getInstance("AES/CBC/PKCS5Padding");
v1.init(1, ((Key)v2), new IvParameterSpec("443322110011".getBytes()));
return a.a(v1.doFinal(arg5.getBytes()));
}
return v0;
}
catch(Exception ) {
return v0;
}
}
return v0;
}
}
感谢大神
补充内容 (2024-3-7 21:19):
加密后又将字节处理了。。具体咋处理的 看不明白。请求大神 |