Bill Ford
unread,Jun 24, 2022, 9:18:10 PM6/24/22Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message as abuse
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Crypto++ Users
I am developing a Linux, MacOS, and Windows application that involves AES encryption
using cryptopp and have been stuck on a statement that generates confusing errors I do
not understand:
byte key[AES::DEFAULT_KEYLENGTH];
byte iv[AES::BLOCKSIZE];
CFB_Mode<AES>::Encryption e;
e.SetKeyWithIV (key, sizeof (key), iv);
// StreamTransformationFilter
StringSource (dataToEncrypt, true,
new StreamTransformationFilter (e, new StringSink (cipher)));
); // StringSource
Lines 9-13 generate
no matching function for call to 'CryptoPP::CipherModeFinalTemplate_CipherHolder<CryptoPP::BlockCipherFinal<CryptoPP::ENCRYPTION, CryptoPP::Rijndael::Enc>, CryptoPP::ConcretePolicyHolder<CryptoPP::Empty, CryptoPP::CFB_EncryptionTemplate<CryptoPP::AbstractPolicyHolder<CryptoPP::CFB_CipherAbstractPolicy, CryptoPP::CFB_ModePolicy> > > >::SetKeyWithIV(std::byte [16], long unsigned int, std::byte [16])'
and anothers errors include
expected primary-expression before ')' token
d.SetKeyWithIV (key, sizeof (key), (byte *)iv,);
| ^
error: cannot convert 'std::byte [16]' to 'CryptoPP::byte*' {aka 'unsigned char*'}
479 | prng.GenerateBlock (key, sizeof (key) );
| ^~~
| |
| std::byte [16]
I would appreciate it if someone can help with this.