Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #region Encryption for INT by Eddy^CZ 2018
- public static int DecryptLdcI4(int input, int Key)
- {
- var HashProvider = SHA512.Create();
- byte[] KEY = HashProvider.ComputeHash(BitConverter.GetBytes(Key));
- int IV0 = 0;
- int IV1 = 0;
- int IV2 = 0;
- int IV3 = 0;
- int[] IVS = new int[KEY.Length];
- for (int a = 0; a < IVS.Length; a++)
- {
- IVS[a] = KEY[a] % (a + 1) ^ (int)input ^ (a + 1) ^ (int)input;
- }
- for (int i = 0; i < IVS.Length; i++)
- {
- int X = (int)Math.Log10(IVS[i]);
- IV0 ^= IVS[i] ^ (((IVS[i] ^ (int)X)) * i >> (int)((float)i * (float)0.25F));
- IV1 += IVS[i] >> (((IVS[i] ^ (int)X)) * i << (int)((short)i + (float)0.58F));
- IV2 -= IVS[i] << (((IVS[i] ^ (int)X)) * i >> (int)((float)i * (float)0.41F));
- IV3 ^= IVS[i] + (((IVS[i] ^ (int)X)) * i << (int)((float)i - (float)0.99F));
- }
- return (IV0 ^ input) ^ (IV1 ^ input) ^ (IV2 ^ input) ^ IV3;
- }
- #endregion
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement