凯撒密码算法

  • j2_133851
    了解作者
  • 8.6KB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-05-20 11:00
    上传日期
凯撒密码,又叫替代密码,算法的原理是使用替代法进行加密,就是将明文中的字符用其他字符替代后形成密文
mima.rar
  • mima.docx
    9.5KB
内容介绍
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8"> <meta name="generator" content="pdf2htmlEX"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <link rel="stylesheet" href="https://static.pudn.com/base/css/base.min.css"> <link rel="stylesheet" href="https://static.pudn.com/base/css/fancy.min.css"> <link rel="stylesheet" href="https://static.pudn.com/prod/directory_preview_static/6287058316e0ca7141d34f49/raw.css"> <script src="https://static.pudn.com/base/js/compatibility.min.js"></script> <script src="https://static.pudn.com/base/js/pdf2htmlEX.min.js"></script> <script> try{ pdf2htmlEX.defaultViewer = new pdf2htmlEX.Viewer({}); }catch(e){} </script> <title></title> </head> <body> <div id="sidebar" style="display: none"> <div id="outline"> </div> </div> <div id="pf1" class="pf w0 h0" data-page-no="1"><div class="pc pc1 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://static.pudn.com/prod/directory_preview_static/6287058316e0ca7141d34f49/bg1.jpg"><div class="c x0 y1 w2 h2"><div class="t m0 x1 h3 y2 ff1 fs0 fc0 sc0 ls0 ws0">#include&lt;stdio.h&gt;</div><div class="t m0 x1 h3 y3 ff1 fs0 fc0 sc0 ls0 ws0">#include&lt;windows.h&gt;</div><div class="t m0 x1 h3 y4 ff1 fs0 fc0 sc0 ls0 ws0">void main() </div><div class="t m0 x1 h3 y5 ff1 fs0 fc0 sc0 ls0 ws0">{ </div><div class="t m0 x1 h3 y6 ff1 fs0 fc0 sc0 ls0 ws0">char p[1000]; </div><div class="t m0 x1 h3 y7 ff1 fs0 fc0 sc0 ls0 ws0">char c[1000]; </div><div class="t m0 x1 h3 y8 ff1 fs0 fc0 sc0 ls0 ws0">int k<span class="_ _0"></span>ey<span class="_ _1"></span>,i,m; </div><div class="t m0 x1 h3 y9 ff1 fs0 fc0 sc0 ls0 ws0">k<span class="_ _0"></span>ey=5; </div><div class="t m0 x1 h4 ya ff1 fs0 fc0 sc0 ls0 ws0">/*<span class="ff2">&#23450;&#20041;&#19968;&#20010;&#31227;&#20301;&#20010;&#25968;&#20026;<span class="_ _2"> </span></span>5<span class="ff2">&#65292;&#21363;&#21152;&#23494;&#21521;&#21491;&#31227;<span class="_ _2"> </span></span>5<span class="_"> </span><span class="ff2">&#20301;&#65292;&#35299;&#23494;&#21017;&#30456;&#21453;</span>*/ </div><div class="t m0 x1 h3 yb ff1 fs0 fc0 sc0 ls0 ws0">prin&amp;("please input the Plainte<span class="_ _0"></span>xt: "); </div><div class="t m0 x1 h3 yc ff1 fs0 fc0 sc0 ls0 ws0">gets(p); </div><div class="t m0 x1 h4 yd ff1 fs0 fc0 sc0 ls0 ws0">/*<span class="ff2">&#35835;&#21462;&#23383;&#31526;<span class="_ _3"></span>&#20018;&#65292;&#30452;&#33267;&#25509;&#21463;<span class="_ _3"></span>&#21040;&#25442;&#34892;&#31526;&#20572;&#27490;<span class="_ _3"></span>&#65292;&#24182;&#23558;&#35835;&#21462;&#30340;&#32467;&#26524;<span class="_ _3"></span>&#23384;&#25918;&#22312;<span class="_ _4"> </span></span>p[1000]<span class="ff2">&#20013;&#12290;&#25442;<span class="_ _3"></span>&#34892;&#31526;&#19981;&#20316;&#20026;</span></div><div class="t m0 x1 h4 ye ff2 fs0 fc0 sc0 ls0 ws0">&#35835;&#21462;&#20018;&#30340;&#20869;&#23481;&#65292;&#35835;&#21462;&#30340;&#25442;&#34892;&#31526;&#34987;&#36716;&#25442;&#20026;<span class="_ _2"> </span><span class="ff1">null<span class="_"> </span></span>&#20540;&#65292;&#24182;&#30001;&#27492;&#26469;&#32467;&#26463;&#23383;&#31526;&#20018;&#12290;<span class="ff1">*<span class="_ _0"></span>/ </span></div><div class="t m0 x1 h3 yf ff1 fs0 fc0 sc0 ls0 ws0">for(i=0;p[i]!='';i++) </div><div class="t m0 x1 h3 y10 ff1 fs0 fc0 sc0 ls0 ws0">c[i]=(p[i]-'a'+k<span class="_ _0"></span>ey)%26+'a'; </div><div class="t m0 x1 h4 y11 ff1 fs0 fc0 sc0 ls0 ws0">/*<span class="ff2">&#21152;&#23494;&#31639;&#27861;&#65292;&#25152;&#26377;&#26126;&#25991;&#31526;&#21495;&#30001;&#21521;&#21491;&#31227;<span class="_ _2"> </span></span>5<span class="_"> </span><span class="ff2">&#20301;&#30340;&#23494;&#25991;&#20195;&#26367;</span>*/ </div><div class="t m0 x1 h3 y12 ff1 fs0 fc0 sc0 ls0 ws0">c[i]=''; </div><div class="t m0 x1 h3 y13 ff1 fs0 fc0 sc0 ls0 ws0">prin&amp;("the Cipherte<span class="_ _0"></span>xt <span class="_ _3"></span>is: %s ",c); </div><div class="t m0 x1 h4 y14 ff1 fs0 fc0 sc0 ls0 ws0">/*<span class="ff2">&#36755;&#20986;&#21152;&#23494;&#21518;&#30340;&#23494;&#25991;</span>*/ </div><div class="t m0 x1 h3 y15 ff1 fs0 fc0 sc0 ls0 ws0">prin&amp;("please input the Ciptert<span class="_ _0"></span>ext: "); </div><div class="t m0 x1 h3 y16 ff1 fs0 fc0 sc0 ls0 ws0">gets(c); </div><div class="t m0 x1 h4 y17 ff1 fs0 fc0 sc0 ls0 ws0">/*<span class="ff2">&#35835;&#21462;<span class="_ _3"></span>&#23383;&#31526;&#20018;<span class="_ _3"></span>&#65292;&#30452;&#33267;<span class="_ _3"></span>&#25509;&#21463;&#21040;&#25442;<span class="_ _3"></span>&#34892;&#31526;&#20572;<span class="_ _3"></span>&#27490;&#65292;&#24182;<span class="_ _3"></span>&#23558;&#35835;&#21462;<span class="_ _3"></span>&#30340;&#32467;&#26524;&#23384;<span class="_ _3"></span>&#25918;&#22312;<span class="_ _5"> </span></span>c[1000]<span class="ff2">&#20013;<span class="_ _3"></span>&#12290;&#25442;&#34892;<span class="_ _3"></span>&#31526;&#19981;&#20316;&#20026;</span></div><div class="t m0 x1 h4 y18 ff2 fs0 fc0 sc0 ls0 ws0">&#35835;&#21462;&#20018;&#30340;&#20869;&#23481;&#65292;&#35835;&#21462;&#30340;&#25442;&#34892;&#31526;&#34987;&#36716;&#25442;&#20026;<span class="_ _2"> </span><span class="ff1">null<span class="_"> </span></span>&#20540;&#65292;&#24182;&#30001;&#27492;&#26469;&#32467;&#26463;&#23383;&#31526;&#20018;&#12290;<span class="ff1">*<span class="_ _0"></span>/ </span></div><div class="t m0 x1 h3 y19 ff1 fs0 fc0 sc0 ls0 ws0">for(i=0;c[i]!='';i++) </div><div class="t m0 x1 h3 y1a ff1 fs0 fc0 sc0 ls0 ws0">p[i]='z'-('z'+k<span class="_ _0"></span>ey-c[i])%26; </div><div class="t m0 x1 h4 y1b ff1 fs0 fc0 sc0 ls0 ws0">/*<span class="ff2">&#35299;&#23494;&#31639;&#27861;&#65292;&#25152;&#26377;&#26126;&#25991;&#31526;&#21495;&#30001;&#21521;&#24038;&#31227;<span class="_ _2"> </span></span>5<span class="_"> </span><span class="ff2">&#20301;&#30340;&#26126;&#25991;&#20195;&#26367;</span>*/ </div><div class="t m0 x1 h3 y1c ff1 fs0 fc0 sc0 ls0 ws0">p[i]=''; </div><div class="t m0 x1 h3 y1d ff1 fs0 fc0 sc0 ls0 ws0">prin&amp;("the Plaint<span class="_ _0"></span>ext is: %s ",p); </div><div class="t m0 x1 h4 y1e ff1 fs0 fc0 sc0 ls0 ws0">/*<span class="ff2">&#36755;&#20986;&#35299;&#23494;&#21518;&#30340;&#26126;&#25991;</span>*/ </div><div class="t m0 x1 h3 y1f ff1 fs0 fc0 sc0 ls0 ws0">sy<span class="_ _0"></span>stem("pause");</div><div class="t m0 x1 h3 y20 ff1 fs0 fc0 sc0 ls0 ws0">return; </div><div class="t m0 x1 h3 y21 ff1 fs0 fc0 sc0 ls0 ws0">}</div></div></div><div class="pi" data-data='{"ctm":[1.611850,0.000000,0.000000,1.611850,0.000000,0.000000]}'></div></div> </body> </html>
评论
    相关推荐
    • 算法
      算法 算法
    • 程序员算法
      这是一个算法文档压缩包,其中包括《可能与不可能的边界》、《具体数学》、《算法的乐趣》、《啊哈!算法》。这些书很适合对算法感兴趣的朋友,书籍讲解算法非常有趣。注意,其中有些文档是试读版本。
    • 算法实验
      算法实验算法实验算法实验算法实验算法实验算法实验算法实验算法实验
    • SIFT 算法
      SIFT 算法SIFT 算法SIFT 算法SIFT 算法
    • RSA算法
      RSA算法是公钥加密算法中重要的算法之一,本算法即实现RSA的加解密过程。
    • 分词算法介分词算法
      算法 汉语分词介绍分词算法 汉语分词介绍分词算法 汉语分词介绍分词算法 汉语分词介绍分词算法 汉语分词介绍分词算法 汉语分词介绍分词算法 汉语分词介绍分词算法 汉语分词介绍分词算法 汉语分词介绍分词算法 汉语...
    • unify算法
      unify算法unify算法unify算法unify算法unify算法unify算法unify算法unify算法unify算法unify算法unify算法unify算法unify算法
    • 寻路算法
      寻路算法 寻路封装
    • dsp算法算法算法算法
      dsp各种算法
    • 大数据算法
      本书共分为10章,第1章概述大数据算法,第2章介绍时间亚线性算法,第3章介绍空间亚线性算法,第4章概述外存算法,第5章介绍大数据外存查找结构,第6章讲授外存图数据算法,第7章概述MapReduce算法,第8章通过一系列...