randomly raises the following error in approximately 99% of cases:
"Invalid Operation; -208"
This happens under Delphi 11.3 and Delphi 12.3 (both 32 bit and 64 bit VCL) using version v5.0.9.5 of the Cryptography Pack.
This exact same code worked fine with version 4.x.
Moreover, this snippet is a direct copy/paste from your TMSCryptographyPack.pdf documentation, § AES (modes ECB-CBC-OFB-CTR-CTS).
Could you please investigate this issue or confirm if there’s a workaround or regression fix?
Could you please update all the relevant code samples in your TMSCryptographyPack.pdf to reflect the changes introduced in version 5.x?
Also, it would be very helpful to clearly mention somewhere (preferably at the beginning of the documentation or in a changelog) that there is a major breaking change between versions 4.x and 5.x. This would help avoid confusion and save time for developers updating their projects.
In my case, I’m using these components inside TMS Scripter, so I was troubleshooting at the scripting level and digging through my own library functions before realizing the issue was due to a change in the core component behavior.
For the manual: yes, most examples will be updated for the next release. That is something I overlooked.
The 'inputFormat' addition was mentioned in a couple of places, but obviously not clearly enough. I'll try to improve that.
In the manual:
( NOTE 3: some APIs have been changed to ensure better uniformity across cryptographic interfaces and Users may have to adjust existing code to take those changes into account, especially with the new ‘inputFormat’ property (see README-FIRST.txt).)