Advertisement
EddyCZ

INT 32 Encrypt

Dec 30th, 2018
294
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.92 KB | None | 0 0
  1. #region Encryption for INT by Eddy^CZ 2018
  2.   public static int DecryptLdcI4(int input, int Key)
  3.   {
  4.    var HashProvider = SHA512.Create();
  5.    byte[] KEY = HashProvider.ComputeHash(BitConverter.GetBytes(Key));
  6.    int IV0 = 0;
  7.    int IV1 = 0;
  8.    int IV2 = 0;
  9.    int IV3 = 0;
  10.    int[] IVS = new int[KEY.Length];
  11.    for (int a = 0; a < IVS.Length; a++)
  12.    {
  13.     IVS[a] = KEY[a] % (a + 1) ^ (int)input ^ (a + 1) ^ (int)input;
  14.    }
  15.    for (int i = 0; i < IVS.Length; i++)
  16.    {
  17.     int X = (int)Math.Log10(IVS[i]);
  18.     IV0 ^= IVS[i] ^ (((IVS[i] ^ (int)X)) * i >> (int)((float)i * (float)0.25F));
  19.     IV1 += IVS[i] >> (((IVS[i] ^ (int)X)) * i << (int)((short)i + (float)0.58F));
  20.     IV2 -= IVS[i] << (((IVS[i] ^ (int)X)) * i >> (int)((float)i * (float)0.41F));
  21.     IV3 ^= IVS[i] + (((IVS[i] ^ (int)X)) * i << (int)((float)i - (float)0.99F));
  22.    }
  23.    return (IV0 ^ input) ^ (IV1 ^ input) ^ (IV2 ^ input) ^ IV3;
  24.   }
  25.   #endregion
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement