From 786aad69f072c2150729449cdce62e85fcff1ec2 Mon Sep 17 00:00:00 2001 From: Kurt Date: Sun, 29 Mar 2020 12:33:27 -0700 Subject: [PATCH] Clamp shift max --- NHSE.Core/Encryption/EncryptedInt32.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NHSE.Core/Encryption/EncryptedInt32.cs b/NHSE.Core/Encryption/EncryptedInt32.cs index 50bff5a..8f03dd8 100644 --- a/NHSE.Core/Encryption/EncryptedInt32.cs +++ b/NHSE.Core/Encryption/EncryptedInt32.cs @@ -27,7 +27,7 @@ public EncryptedInt32(uint encryptedValue, ushort adjust = 0, byte shift = 0, by public EncryptedInt32(uint value) { Adjust = (ushort)RandUtil.Rand.Next(); - Shift = (byte)RandUtil.Rand.Next(); + Shift = (byte)RandUtil.Rand.Next(27); var enc = Encrypt(value, Shift, Adjust); Checksum = CalculateChecksum(enc); Value = value;