fix: fix incorrect assert in DefaultConstEncryptor::ObfuscateString
parent
bd6c70072f
commit
6306a5604a
|
@ -184,7 +184,7 @@ namespace Obfuz.ObfusPasses.ConstEncrypt
|
||||||
int salt = GenerateSalt(random);
|
int salt = GenerateSalt(random);
|
||||||
int stringByteLength = Encoding.UTF8.GetByteCount(value);
|
int stringByteLength = Encoding.UTF8.GetByteCount(value);
|
||||||
byte[] encryptedValue = encryptionScope.encryptor.Encrypt(value, ops, salt);
|
byte[] encryptedValue = encryptionScope.encryptor.Encrypt(value, ops, salt);
|
||||||
Assert.IsTrue(encryptedValue.Length % 4 == 0);
|
Assert.AreEqual(stringByteLength, encryptedValue.Length);
|
||||||
RvaData rvaData = _rvaDataAllocator.Allocate(method.Module, encryptedValue);
|
RvaData rvaData = _rvaDataAllocator.Allocate(method.Module, encryptedValue);
|
||||||
|
|
||||||
DefaultMetadataImporter importer = GetModuleMetadataImporter(method);
|
DefaultMetadataImporter importer = GetModuleMetadataImporter(method);
|
||||||
|
|
Loading…
Reference in New Issue