如何解密文件的内容. [英] How to Decrypt the contents of the File.

查看:71
本文介绍了如何解密文件的内容.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好..

我正在使用像这样在WIN32中加密文本:

Hello Everyone..

Am using Encrypting the text like this in WIN32:

char textOut[25]="This text is for Encryption";
for(int q=0;q<=len;q++)
                    {
                        textOut[q]=textOut[q]^0xAA;
                    }
MessageBox(NULL,textOut,"",MB_OK);



无论如何,我在MessageBox中获取了加密的文本..但是我却没有获取如何解密的信息..

请帮助我.还有什么更好的加密和加密方法?解密..如果可以,请告诉我..

在此先感谢..



Anyhow, Am getting Encrypted text in MessageBox.. But Am not getting how to Decrypt back..

Please help me.. And is there any better way to Encrypt & Decrypt.. If So do tell me..

Thanks in Advance..!

推荐答案

再次执行XOR操作将使您返回原始字符,请尝试:
Performing the XOR operation again would give you back the original character, try:
char plain = 'A';
char encrypted = plain ^ 0xAA;
char decrypted = encrypted ^ 0xAA;
assert(plain==decrypted);


这篇关于如何解密文件的内容.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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