No-throw api for AES128?

22 views
Skip to first unread message

Daniel Fricot

unread,
Jan 9, 2023, 5:53:38 AMJan 9
to Crypto++ Users
Is there a no-throw api for AES128? Currently, I am using CryptoPP::StreamTransformationFilter for AES128 which may throw CryptoPP::InvalidCiphertext. This is not an error of course, it is expected behavior but our coding guidelines prefer no-throw api's. All throws (even catched throws) are logged in our application and we want to keep this to a minimum.
Thanks,
Daniel

Jeffrey Walton

unread,
Mar 29, 2023, 9:38:45 AMMar 29
to Crypto++ Users
On Monday, January 9, 2023 at 5:53:38 AM UTC-5 Daniel Fricot wrote:
Is there a no-throw api for AES128? Currently, I am using CryptoPP::StreamTransformationFilter for AES128 which may throw CryptoPP::InvalidCiphertext. This is not an error of course, it is expected behavior but our coding guidelines prefer no-throw api's. All throws (even catched throws) are logged in our application and we want to keep this to a minimum.
Thanks,

You can use a cipher's StreamTransformation::ProcessString() directly rather than the StreamTransformationFilter.

The benchmarks use the same pattern. Also see


Jeff
Reply all
Reply to author
Forward
Message has been deleted
0 new messages