codeing000

所属分类:数值算法/人工智能
开发工具:Visual C++
文件大小:2KB
下载次数:12
上传日期:2006-02-05 20:39:08
上 传 者lqh604
说明:  从空格(ASCII码32)到~(ASCII码126)。表内的第一行与表头相同,下面的每一行都与上一行的内容相同,只是字符相左移动了一个位置。这样,下一行的最后一个字符与上一行的第一个字符相同。 为了进行文本编码,可以任意选择一个字符串,称之为编码字符串,也就是常说的密钥。为解释编码方法,我们假设密钥是Walrus,待编码的文本(即常说的明文)是: Meet me in St. Louis 我们在待编码的文本之上重复书写上述密钥,使得其长度与待编码文本相同: WalrusWalrusWalrusWa Meet me in St. Louis 从上述两行文本中按列对应方式依次提取一个字符,可得到多个字符对:WM、ae、le等,这些字符对可用作上表的索引。这样,依次以这些字符对作为索引可从上表查到一系列字符,这些字符就构成了文本编码,即常说的密文。例如,第W行第M列队应得字符是%,因此编码的第一个字符就是%;第a行第e列对应的字符是G;第l行第e列对应的是R。依次进行上述查找操作,可以得到完整的密文 %Grgua=aVauGLol?eiAU 进行相反的操作就可对该文本解码。 编写编码/解码程序,可以对文本文件或键盘输入的字符串进行编码/解码,在选择编码解码后,需要提示用户输入密钥。
(from space (ASCII 32) to ~ (ASCII 126). The schedule of the first line with the same head table, each of the rows below the previous line with the same content. Character movement is a curator position. So, the next line of characters with a final party on the first character of the same. To text encoding, can choose an arbitrary string, the string as coding, which is often said that the key. To explain the encoding method, we assume that key is Walrus when coding the text (often said that an express) : Meet me in St.. Louis coding in question above the text written above key repeat, making its length and text encoding the same question : WalrusWalrusWalrusWa Meet me in St.. Louis from the above two OK text counterpart way out by the extraction followed a character, a number of characters )

文件列表:
code.h (263, 2006-01-17)
coding.cpp (610, 2006-01-17)
code.cpp (1965, 2006-01-17)
a.txt (351, 2006-01-16)

近期下载者

相关文件


收藏者