I am developing a Linux, MacOS, and Windows application that involves AES 
using cryptopp and have been stuck on a statement that generates confusing 
errors I do
not understand:

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::Rijndael::Enc>, CryptoPP::ConcretePolicyHolder<CryptoPP::Empty,   
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 
  479 |         prng.GenerateBlock (key, sizeof (key) );
      |                             ^~~
      |                             |
      |                             std::byte [16]

I would appreciate it if someone can help with this.

You received this message because you are subscribed to the Google Groups 
"Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cryptopp-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 

Reply via email to