CryptoPP::StreamTransformationFilter Access violation reading location

0

I tried to use AES, but encountered a conflict during the encryption process

string plain, cipher; //have value
CFB_Mode< AES >::Encryption e;
    e.SetKeyWithIV(key_byte, sizeof(key_byte), iv_byte);
StringSource ss(plain, true, 
    new StreamTransformationFilter(e, 
        new StringSink(cipher), BlockPaddingSchemeDef::DEFAULT_PADDING
    )
);

CryptoPP 8.2

only lib

Wrong CryptoPP::filters.cpp 589

Exception thrown at 0x00007FFE76AC5D20 (vcruntime140.dll) in UE4Editor.exe: 0xC0000005: Access violation reading location 0x0000007D9B0E3E9C. occurred

588    const bool authenticatedFilter = dynamic_cast<AuthenticatedSymmetricCipher *>(&c) != NULLPTR;
589    if (authenticatedFilter)
590        throw InvalidArgument("StreamTransformationFilter: please use AuthenticatedEncryptionFilter and AuthenticatedDecryptionFilter for AuthenticatedSymmetricCipher");

What is the cause of the conflict and how can I fix it?

crypto++
asked on Stack Overflow Aug 3, 2020 by Punka • edited Aug 4, 2020 by Punka

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0