MHumm / DelphiEncryptionCompendium

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

No sNoKeyMaterialGiven Exception if Context.KeySize=0 #68

Open danielmarschall opened 5 months ago

danielmarschall commented 5 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?