gpt4 book ai didi

c++ - 密码++ : CFB_Mode_ExternalCipher not working

转载 作者:行者123 更新时间:2023-11-30 04:43:41 26 4
gpt4 key购买 nike

这就是代码的样子。这有什么问题吗?恢复文本不匹配。

AES::Encryption aes1(key, key.size());
CFB_Mode_ExternalCipher::Encryption cfbEncryption(aes1, iv);
AES::Decryption aes2(key, key.size());
CFB_Mode_ExternalCipher::Decryption cfbDecryption(aes2, iv);

ArraySink cipherSink(cipher, data_size);
ArraySource ss1(plain, data_size, true, new StreamTransformationFilter(cfbEncryption, new Redirector(cipherSink)));

ArraySink recoverSink(recover, data_size);
ArraySource ss2(cipher, data_size, true, new StreamTransformationFilter(cfbDecryption, new Redirector(recoverSink)));

最佳答案

在转换中使用CTR Mode External Cipher时,加密也用于解密。

https://www.codeproject.com/Articles/21877/Applied-Crypto-Block-Ciphers

关于c++ - 密码++ : CFB_Mode_ExternalCipher not working,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58123211/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com