使用Crypto ++加密字节数组 [英] Encrypt byte array using Crypto++

查看:200
本文介绍了使用Crypto ++加密字节数组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请帮助我使用Crypto ++ TEA算法或类似方法对字节数组进行编码!

我想要一个

Please, help me to encode and a byte array using Crypto++ TEA algorythm or similar!

I want to have a

unsigned char *lOutputArray;


在输出时,如果我有


at output if I have

unsigned char *lInputArray;
unsigned char *lSecretKey;



问题是我不能像许多示例中那样使用std:strings.

谢谢!



The problem is that I cannot use std:strings, like in many examples is used.

Thanks!

推荐答案

应用的C ++++:分组密码 [ ^ ] 示例1 不使用std::string,因此您可以根据需要调整示例代码.
欢呼声,
AR
Applied Crypto++: Block Ciphers[^] Sample 1 does not use std::string, so you can adapt the sample code to your needs.
cheers,
AR


CryptoPP :: ECB_Mode< CryptoPP :: AES> :: Encryption lEncryptor;

undefined reference to `CryptoPP::g_nullNameValuePairs''
=''(

而且我不知道如何使用自己的密钥.只是代替memset?
CryptoPP::ECB_Mode<CryptoPP::AES>::Encryption lEncryptor;
gives
undefined reference to `CryptoPP::g_nullNameValuePairs''
=''(

And I can''t get how to use my own secret key. Just instead of memset?


这篇关于使用Crypto ++加密字节数组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆