代换加密

Posted butchert

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了代换加密相关的知识,希望对你有一定的参考价值。

#include "stdafx.h"
#include "iostream"
using namespace std;
#include "string"

char a[26]={d,l,r,y,v,o,h,e,z,x,w,p,t,b,g,f,j,q,n,m,u,s,k,a,c,i};//代换表

void fuc(string s)
{
    for(int i=0;i<s.size();i++)
        s[i]=a[s[i]-65];
    cout<<s<<endl;
}
int _tmain(int argc, _TCHAR* argv[])
{
    string s="MGZVYZLGHCMHJMYXSSFMNHAHYCDLMHA";
    fuc(s);
    return 0;
}

 

以上是关于代换加密的主要内容,如果未能解决你的问题,请参考以下文章