public void RandomizeCryptoKey() { Quaternion quaternion = this.InternalDecrypt(); this.currentCryptoKey = Random.get_seed(); this.hiddenValue = ObscuredQuaternion.Encrypt(quaternion, this.currentCryptoKey); }
private ObscuredQuaternion(ObscuredQuaternion.RawEncryptedQuaternion value) { this.currentCryptoKey = ObscuredQuaternion.cryptoKey; this.hiddenValue = value; this.fakeValue = ObscuredQuaternion.initialFakeValue; this.inited = true; }
public void ApplyNewCryptoKey() { if (this.currentCryptoKey != ObscuredQuaternion.cryptoKey) { this.hiddenValue = ObscuredQuaternion.Encrypt(this.InternalDecrypt(), ObscuredQuaternion.cryptoKey); this.currentCryptoKey = ObscuredQuaternion.cryptoKey; } }
public void SetEncrypted(ObscuredQuaternion.RawEncryptedQuaternion encrypted) { this.inited = true; this.hiddenValue = encrypted; if (ObscuredCheatingDetector.IsRunning) { this.fakeValue = this.InternalDecrypt(); } }
public static Quaternion Decrypt(ObscuredQuaternion.RawEncryptedQuaternion value, int key) { if (key == 0) { key = ObscuredQuaternion.cryptoKey; } Quaternion result; result.x = ObscuredFloat.Decrypt(value.x, key); result.y = ObscuredFloat.Decrypt(value.y, key); result.z = ObscuredFloat.Decrypt(value.z, key); result.w = ObscuredFloat.Decrypt(value.w, key); return result; }
public static Quaternion Decrypt(ObscuredQuaternion.RawEncryptedQuaternion value, int key) { if (key == 0) { key = ObscuredQuaternion.cryptoKey; } Quaternion quaternion; quaternion.x = (__Null)(double)ObscuredFloat.Decrypt(value.x, key); quaternion.y = (__Null)(double)ObscuredFloat.Decrypt(value.y, key); quaternion.z = (__Null)(double)ObscuredFloat.Decrypt(value.z, key); quaternion.w = (__Null)(double)ObscuredFloat.Decrypt(value.w, key); return(quaternion); }
private Quaternion InternalDecrypt() { if (!this.inited) { this.currentCryptoKey = ObscuredQuaternion.cryptoKey; this.hiddenValue = ObscuredQuaternion.Encrypt(ObscuredQuaternion.initialFakeValue); this.fakeValue = ObscuredQuaternion.initialFakeValue; this.inited = true; } Quaternion quaternion; quaternion.x = ObscuredFloat.Decrypt(this.hiddenValue.x, this.currentCryptoKey); quaternion.y = ObscuredFloat.Decrypt(this.hiddenValue.y, this.currentCryptoKey); quaternion.z = ObscuredFloat.Decrypt(this.hiddenValue.z, this.currentCryptoKey); quaternion.w = ObscuredFloat.Decrypt(this.hiddenValue.w, this.currentCryptoKey); if (ObscuredCheatingDetector.IsRunning && !this.fakeValue.Equals(ObscuredQuaternion.initialFakeValue) && !this.CompareQuaternionsWithTolerance(quaternion, this.fakeValue)) { ObscuredCheatingDetector.Instance.OnCheatingDetected(); } return quaternion; }
private Quaternion InternalDecrypt() { if (!this.inited) { this.currentCryptoKey = ObscuredQuaternion.cryptoKey; this.hiddenValue = ObscuredQuaternion.Encrypt(ObscuredQuaternion.initialFakeValue); this.fakeValue = ObscuredQuaternion.initialFakeValue; this.inited = true; } Quaternion q1; q1.x = (__Null)(double)ObscuredFloat.Decrypt(this.hiddenValue.x, this.currentCryptoKey); q1.y = (__Null)(double)ObscuredFloat.Decrypt(this.hiddenValue.y, this.currentCryptoKey); q1.z = (__Null)(double)ObscuredFloat.Decrypt(this.hiddenValue.z, this.currentCryptoKey); q1.w = (__Null)(double)ObscuredFloat.Decrypt(this.hiddenValue.w, this.currentCryptoKey); // ISSUE: explicit reference operation if (ObscuredCheatingDetector.IsRunning && !((Quaternion)@this.fakeValue).Equals((object)ObscuredQuaternion.initialFakeValue) && !this.CompareQuaternionsWithTolerance(q1, this.fakeValue)) { ObscuredCheatingDetector.Instance.OnCheatingDetected(); } return(q1); }
public static Quaternion Decrypt(ObscuredQuaternion.RawEncryptedQuaternion value) { return(ObscuredQuaternion.Decrypt(value, 0)); }
public void RandomizeCryptoKey() { Quaternion value = this.InternalDecrypt(); this.currentCryptoKey = UnityEngine.Random.Range(-2147483648, 2147483647); this.hiddenValue = ObscuredQuaternion.Encrypt(value, this.currentCryptoKey); }