Advertisement
Guest User

Untitled

a guest
Nov 12th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.95 KB | None | 0 0
  1. package com.megaevilcorp.xpcoinwallet;
  2.  
  3. import android.util.Base64;
  4. import java.nio.charset.StandardCharsets;
  5. import java.util.Arrays;
  6.  
  7. public class e {
  8. private static byte[] x = {41, 12, 88, 3, 56, 28, 17, 93};
  9. private static byte[] z = {83, 101, 55, 110, 111, 108, 100, 46, 74, 65, 54, 106, 93};
  10.  
  11. public static boolean letmilogin(String w) {
  12. byte[] mng = xorrrizo(w.getBytes(), x);
  13. String encodeToString = Base64.encodeToString(mng, 0);
  14. String ex = ex(w);
  15. return Arrays.equals(mng, z);
  16. }
  17.  
  18. public static String ux(String w) {
  19. return new String(xorrrizo(Base64.decode(w, 0), x), StandardCharsets.UTF_8);
  20. }
  21.  
  22. public static String ex(String inp) {
  23. return Base64.encodeToString(xorrrizo(inp.getBytes(), x), 0);
  24. }
  25.  
  26. public static String bA2H(byte[] a) {
  27. StringBuilder sb = new StringBuilder(a.length * 2);
  28. for (byte b : a) {
  29. sb.append(String.format("%02x", new Object[]{Byte.valueOf(b)}));
  30. }
  31. return sb.toString();
  32. }
  33.  
  34. public static byte[] he2by(String hex) {
  35. byte[] out = new byte[(hex.length() / 2)];
  36. for (int i = 0; i < out.length; i++) {
  37. int index = i * 2;
  38. out[i] = (byte) Integer.parseInt(hex.substring(index, index + 2), 16);
  39. }
  40. return out;
  41. }
  42.  
  43. private static byte[] xorrrizo(byte[] inp, byte[] xor) {
  44. byte[] out = new byte[inp.length];
  45. for (int i = 0; i < inp.length; i++) {
  46. out[i] = (byte) (inp[i] ^ xor[i % 8]);
  47. }
  48. return out;
  49. }
  50.  
  51. private static byte[] m2(byte[] inp, int pos, int direct) {
  52. byte[] out = new byte[inp.length];
  53. for (int i = 0; i < inp.length; i++) {
  54. if (direct == 0) {
  55. out[i] = (byte) (inp[i] >> pos);
  56. } else {
  57. out[i] = (byte) (inp[i] << pos);
  58. }
  59. }
  60. return out;
  61. }
  62. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement