Question:
I have an encrypted string (with ChilkatDotNet2.dll 9.5.0.45) which I want to decrypt with the current version 9.5.0.64. This doesn't work.
Her my code to decrypt:
static void Main(string[] args)
{
var encryptedText = "01A30BD25F16A525ACFD8DC840D94F6626A52036ECD4ECFCCB6B74C7CD3CCA24D0069B1C114AFBD0D37251A6AE380471F5FD4E99EE8013C2E754750C5C7A87FB12F0E93BE0F4DC6B6CE9BBDDA1853245EFF78B45CAC8887E9341C57080500732BE6EA8E5298E3085";
var pwd = "123456";
var crypt = new Crypt2();
var success = crypt.UnlockComponent("???");
if (success != true)
{
return;
}
crypt.CryptAlgorithm = "pbes2";
crypt.PbesPassword = pwd;
crypt.PbesAlgorithm = "rc2";
crypt.KeyLength = 128;
crypt.Rc2EffectiveKeyLength = 128;
crypt.SetEncodedIV("0000000000000000", "hex");
crypt.SetEncodedSalt("0102030405060708", "hex");
crypt.IterationCount = 1024;
crypt.HashAlgorithm = "sha1";
crypt.EncodingMode = "hex";
var decryptedText = crypt.DecryptStringENC(encryptedText);
}
with version 9.5.0.45 the decrypted string is: "cpsdyfrgmVlC43X8iVdWeP21lNcyYkIT23xzSkuKOtVSspcGeUQXVbaOew==9d5f58d7-fa9c-40ed-b08b-b97604f21d54" which it should be
with version 9.5.0.64 the decrypted string is: "´¥ª]RÚ¼°u0014ðnÌZÉ:éé"
the other direction (encryption with 9.5.0.64 and decryption with 9.5.0.45) also doesn't work
Thanks, I'm having a look..
Here's a new build with the fix:
http://chilkatdownload.com/prerelease/chilkatdotnet2-9.5.0-win32.zip
http://chilkatdownload.com/prerelease/chilkatdotnet2-9.5.0-x64.zip
At some point since v9.5.0.45, there was a copy/paste error introduced in the internals such that PBES1 was being used instead of PBES2. This is now fixed, and the results should be the same.
Thanks for your quick answer. Seems to work. When do you expect to release this version? I need also builds for other Frameworks and for C++.