private Vector2Int InternalDecrypt() { if (!inited) { currentCryptoKey = cryptoKey; hiddenValue = Encrypt(zero); fakeValue = zero; fakeValueActive = false; inited = true; return(zero); } var value = new Vector2Int { x = TSInt.Decrypt(hiddenValue.x, currentCryptoKey), y = TSInt.Decrypt(hiddenValue.y, currentCryptoKey) }; if (ObscuredCheatingDetector.ExistsAndIsRunning && fakeValueActive && value != fakeValue) { ObscuredCheatingDetector.Instance.OnCheatingDetected(); } return(value); }
private int InternalDecryptField(int encrypted) { var key = cryptoKey; if (currentCryptoKey != cryptoKey) { key = currentCryptoKey; } var result = TSInt.Decrypt(encrypted, key); return(result); }
/// <summary> /// 解密 /// </summary> public static Vector2Int Decrypt(EncryptedVector2Int value, int key) { if (key == 0) { key = cryptoKey; } var result = new Vector2Int { x = TSInt.Decrypt(value.x, key), y = TSInt.Decrypt(value.y, key) }; return(result); }