当前位置:Gxlcms > PHP教程 > c++加密程序用php怎么写?

c++加密程序用php怎么写?

时间:2021-07-01 10:21:17 帮助过:4人阅读

#define C1 34783
#define C2 55419
CString Encrypt(CString S, WORD Key) // 加密函数
{
    CString Result,str;
    int i,j;
    Result=S; // 初始化结果字符串
    for(i=0; i>8)); // 将密钥移位后与字符异或
        Key = ((BYTE)Result.GetAt(i)+Key)*C1+C2; // 产生下一个密钥
    }
    S=Result; // 保存结果
    Result.Empty(); // 清除结果
    for(i=0; i

这个问题已被关闭,原因:

回复内容:

#define C1 34783
#define C2 55419
CString Encrypt(CString S, WORD Key) // 加密函数
{
    CString Result,str;
    int i,j;
    Result=S; // 初始化结果字符串
    for(i=0; i>8)); // 将密钥移位后与字符异或
        Key = ((BYTE)Result.GetAt(i)+Key)*C1+C2; // 产生下一个密钥
    }
    S=Result; // 保存结果
    Result.Empty(); // 清除结果
    for(i=0; i

人气教程排行