Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.megaevilcorp.xpcoinwallet;
- import android.util.Base64;
- import java.nio.charset.StandardCharsets;
- import java.util.Arrays;
- public class e {
- private static byte[] x = {41, 12, 88, 3, 56, 28, 17, 93};
- private static byte[] z = {83, 101, 55, 110, 111, 108, 100, 46, 74, 65, 54, 106, 93};
- public static boolean letmilogin(String w) {
- byte[] mng = xorrrizo(w.getBytes(), x);
- String encodeToString = Base64.encodeToString(mng, 0);
- String ex = ex(w);
- return Arrays.equals(mng, z);
- }
- public static String ux(String w) {
- return new String(xorrrizo(Base64.decode(w, 0), x), StandardCharsets.UTF_8);
- }
- public static String ex(String inp) {
- return Base64.encodeToString(xorrrizo(inp.getBytes(), x), 0);
- }
- public static String bA2H(byte[] a) {
- StringBuilder sb = new StringBuilder(a.length * 2);
- for (byte b : a) {
- sb.append(String.format("%02x", new Object[]{Byte.valueOf(b)}));
- }
- return sb.toString();
- }
- public static byte[] he2by(String hex) {
- byte[] out = new byte[(hex.length() / 2)];
- for (int i = 0; i < out.length; i++) {
- int index = i * 2;
- out[i] = (byte) Integer.parseInt(hex.substring(index, index + 2), 16);
- }
- return out;
- }
- private static byte[] xorrrizo(byte[] inp, byte[] xor) {
- byte[] out = new byte[inp.length];
- for (int i = 0; i < inp.length; i++) {
- out[i] = (byte) (inp[i] ^ xor[i % 8]);
- }
- return out;
- }
- private static byte[] m2(byte[] inp, int pos, int direct) {
- byte[] out = new byte[inp.length];
- for (int i = 0; i < inp.length; i++) {
- if (direct == 0) {
- out[i] = (byte) (inp[i] >> pos);
- } else {
- out[i] = (byte) (inp[i] << pos);
- }
- }
- return out;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement