On Fri, Jun 24, 2022 at 9:18 PM Bill Ford <wford...@gmail.com> wrote:
>
> 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.

Please add a small program that demonstrates the problem. Please state
which platform you are using. Please show the command line you are
using.

Jeff

-- 
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 
https://groups.google.com/d/msgid/cryptopp-users/CAH8yC8%3DnHRsnLLEeMVeuXXoXzOJ%3DHUw1Z5ajRM0uMis00zbr7A%40mail.gmail.com.

Reply via email to