MHumm / DelphiEncryptionCompendium

Cryptographic library for Embarcadero Delphi and potentially for FPC as well
Apache License 2.0
257 stars 67 forks source link

No sNoKeyMaterialGiven Exception if Context.KeySize=0 #68

Open danielmarschall opened 6 months ago

danielmarschall commented 6 months ago

There can be ciphers which do not allow a key and are not NULL ciphers. For example, "ROT13". Therefore, the Exception sNoKeyMaterialGiven must not be thrown if Context.KeySize = 0.

This PR also adds (not (FMode = cmGCM)) to the AnsiString case. I guess you forgot it?