public static unsafe void DeObfuscateString(char *cPtr, int length, ushort key) { for (int i = 0; i < length; i++) { var cKey = BitRotator.RotateLeft(key, i); * cPtr++ ^= (char)(cKey * (length + 1)); } }
public static unsafe void ObfuscateString(char *cPtr, string value, ushort key) { for (int i = 0; i < value.Length; i++) { var cKey = BitRotator.RotateLeft(key, i); * cPtr++ = (char)(value[i] ^ (cKey * (value.Length + 1))); } }
public static int CombineHashes(int hash1, int hash2) { return(BitRotator.RotateLeft(hash1, 5) ^ hash2 * 1566083941); }