Re-addition of _isEnabled field.

This commit is contained in:
MobiusDevelopment
2021-10-22 02:31:40 +00:00
parent 362295a688
commit 13ce8cbc2c
23 changed files with 276 additions and 0 deletions

View File

@@ -27,6 +27,7 @@ public class Crypt implements ICrypt
{
private final byte[] _inKey = new byte[16];
private final byte[] _outKey = new byte[16];
private boolean _isEnabled;
public void setKey(byte[] key)
{
@@ -37,6 +38,11 @@ public class Crypt implements ICrypt
@Override
public void decrypt(ByteBuf buf)
{
if (!_isEnabled)
{
return;
}
int a = 0;
while (buf.isReadable())
{
@@ -60,6 +66,12 @@ public class Crypt implements ICrypt
@Override
public void encrypt(ByteBuf buf)
{
if (!_isEnabled)
{
_isEnabled = true;
return;
}
int a = 0;
while (buf.isReadable())
{