快马VPN加解密算法提取节点

  1. .method public static e(Ljava/lang/String;)Ljava/lang/String;
  2. .locals 3
  3.  
  4. .line 1
  5. invoke-virtual {p0}, Ljava/lang/String;->getBytes()[B
  6.  
  7. move-result-object p0
  8.  
  9. const-string v0, "345ac9226c94523aeb2be459a5d63ce3"
  10.  
  11. const-string v1, "97043ef635f60558c5c9169252b3bdc9"
  12.  
  13. const-string v2, "AES/CBC/NoPadding"
  14.  
  15. invoke-static {v0, v1, p0, v2}, Lcom/txket/h/g;->c(Ljava/lang/String;Ljava/lang/String;[BLjava/lang/String;)[B
  16.  
  17. move-result-object p0
  18.  
  19. .line 2
  20. invoke-static {p0}, Lcom/txket/h/t;->g([B)Ljava/lang/String;
  21.  
  22. move-result-object p0
  23.  
  24. return-object p0
  25. .end method
  26.  
  27. public static byte[] c(String str, String str2, byte[] bArr, String str3) {
  28. byte[] e = e(str);
  29. try {
  30. IvParameterSpec ivParameterSpec = new IvParameterSpec(e(str2));
  31. SecretKeySpec secretKeySpec = new SecretKeySpec(e, "AES");
  32. Cipher instance = Cipher.getInstance(str3);
  33. instance.init(1, secretKeySpec, ivParameterSpec);
  34. return instance.doFinal(d(bArr));
  35. } catch (Exception e2) {
  36. e2.printStackTrace();
  37. return null;
  38. }
  39. }
  40.   public static byte[] e(String str) {
  41. str = str.toLowerCase();
  42. char[] toCharArray = str.toCharArray();
  43. int length = str.length() / 2;
  44. byte[] bArr = new byte[length];
  45. for (int i = 0; i < length; i++) {
  46. int i2;
  47. int i3 = i * 2;
  48. if (toCharArray[i3] < ':') {
  49. i2 = toCharArray[i3] - 48;
  50. } else {
  51. i2 = toCharArray[i3] - 87;
  52. }
  53. i3++;
  54. if (toCharArray[i3] < ':') {
  55. i3 = toCharArray[i3] - 48;
  56. } else {
  57. i3 = toCharArray[i3] - 87;
  58. }
  59. bArr[i] = (byte) ((i2 * 16) + i3);
  60. }
  61. return bArr;
  62. }

算法:AES/CBC/NoPaddingS

IvParameterSpec:97043ef635f60558c5c9169252b3bdc9

SecretKeySpec:345ac9226c94523aeb2be459a5d63ce3

发表评论

邮箱地址不会被公开。 必填项已用*标注