Encrypt 和 Decrypt 的问题
int RSA_Public_Encrypt (unsigned char *this_output , /* this_output */
unsigned int *this_output_size, /* length of this_output */
unsigned char *this_input , /* this_input */
unsigned int this_input_size ) /* length of this_input */
//加密函数 是将一堆数据封装在一个字符串中(CString)然后写入一个.cri文件中
CFile MyResultFile;
MyResultFile.Open(this->m_FilePath, CFile::modeWrite, &MyException))后直接写入MyResultFile.Write()...
本来一位工程师写了个工具来读取那个加密后的.cri文件的.只是最近发现它有不少问题,想自己写一个,但是又没有原工具的文档和代码参考...
int RSA_Private_Decrypt (unsigned char *this_output , /* this_output */
unsigned int *this_output_size, /* length of this_output */
unsigned char *this_input , /* this_input */
unsigned int this_input_size ) /* length of this_input */
//解密函数
然后我不知道是不是也是直接
CFile MyResultFile;
void *ResultStr;
MyResultFile.Open(this->m_EncypytionFilePathStr, CFile::modeRead, &MyException)
{
MyResultFile.Read(ResultStr, sizeof(unsigned int)/sizeof(char));
...
这样能将里面的数据保存到ResultStr中吗?
然后我是不是就可以调用RSA_Private_Decrypt来解密,然后再转化为CString型,然后将其写入一个EXECL表中.
其中的内容是一些字段和字段的数值...
望高人指点,谢谢!