Skip to content

Change from crypto++ to botan #4371

Closed Answered by randombit
RobertSobral asked this question in Q&A
Discussion options

You must be logged in to vote

Does Botan support Zlib like crypto++?

Yes, but unlike Crypto++ zlib is based on the 3rd party zlib library rather than being implemented directly. So you must enable support at build time (--with-zlib), almost all distros/packagers use this option. You can see an example of usage in the command line utility

What way does botan use to encrypt without using AEAD_Mode just normal AES?

So for AES in counter mode your snippet would look something like this (untested)

auto ctr = Botan::StreamCipher::create_or_throw("AES-128/CTR-BE");
ctr->set_key(MyKey.data(), MyKey.size());
ctr->set_iv(MyIv.data(), MyIv.size());

std::vector<uint8_t> decData;
decData.resize(srcLen);
ctr->cipher(src, decDa…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by randombit
Comment options

You must be logged in to vote
1 reply
@randombit
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants