这是一中安全性极低的加密算法,名叫维吉尼亚密码,一种以移位代换为基础的周期代换密码 为1858年法国密码学家维吉尼亚提出,他的想法就是周期性的将原文加上一个数字,详情请见:http://baike.baidu.com/view/270838.htm这里被加上的是{-2,4,3,5,2,0}六个数字,我写了C++程序来实现加密:#include#includeusing namespace std;const int code[6]={-2,4,3,5,2,0};main(){
string word;
while(cin>>word)
{
...
|