Clamp shift max

This commit is contained in:
Kurt 2020-03-29 12:33:27 -07:00
parent 8428f5955b
commit 786aad69f0

View File

@ -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;