#include <stdio.h> int main() { // 凯撒加密,明文中字母按字母表左移或者右移三位,这里右移 char input[6] = "hello"; char output[6]; int key = 3; int i,j; for (i = 0; i < 5; i++) { int a = input[i]; a += 3; output[i] = (char)a; } output[i] = '\0'; printf("加密后:%s\n", output); for (j = 0; j < 5; j++) { int b = output[j]; b -= 3; input[j] = (char)b; } input[j] = '\0'; printf("解密后:%s", input); return 0; }
当前位置:网站首页>凯撒密码实现
凯撒密码实现
2020-11-07 20:19:00 【PamShao】
版权声明
本文为[PamShao]所创,转载请带上原文链接,感谢
https://www.cnblogs.com/pam-sh/p/13941980.html
边栏推荐
- Idea activation to 2089 failure
- 是时候结束 BERTology了
- 一次公交卡被“盜刷”事件帶來的思考
- Opencv computer vision learning (10) -- image transform (Fourier transform, high pass filter, low pass filter)
- 【涂鸦物联网足迹】物联网主流通信方式
- C language I blog assignment 03
- HMS Core推送服务,助力电商App开展精细化运营
- PHP security: the past and present of variables
- Bgfx compilation tutorial
- Let you have a deep understanding of gitlab CI / CD principle and process
猜你喜欢
2020-11-06:go中,谈一下调度器。
站外推广的计划需要考虑哪些呢?
如何利用PopupWindow实现弹出菜单并解决焦点获取以及与软键盘冲突问题
.NETCore3.1+ Vue.js Low code workflow engine
11.Service更新
一次公交卡被“盜刷”事件帶來的思考
HMS core push service helps e-commerce app to carry out refined operation
[graffiti footprints of Internet of things] mainstream communication mode of Internet of things
pc端与移动端适配解决方案之rem
三步一坑五步一雷,高速成长下的技术团队怎么带?
随机推荐
And how to solve the conflict between pop-up menu and pop-up menu
What kind of technical ability should a programmer who has worked for 1-3 years? How to improve?
华为HCIA笔记
Tips for Mac novices
bgfx编译教程
CPU瞒着内存竟干出这种事
工作1-3年的程序员,应该具备怎么样的技术能力?该如何提升?
DOM node operation
Let you have a deep understanding of gitlab CI / CD principle and process
9.集群之间服务通信 RoutingMesh
11. Service update
ajax 载入html后不能执行其中的js解决方法
失眠一个整晚上
If you want to forget the WiFi network you used to connect to your Mac, try this!
不要把异常当做业务逻辑,这性能可能你无法承受
C language I blog assignment 03
Application and principle of handlermethodargumentresolver
pc端与移动端适配解决方案之rem
阿里terway源码分析
vscode 配置