#include <stdio.h> int main() { // Caesar encryption , The letters in plaintext are shifted three places to the left or right of the alphabet , Move right here 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(" After encryption :%s\n", output); for (j = 0; j < 5; j++) { int b = output[j]; b -= 3; input[j] = (char)b; } input[j] = '\0'; printf(" After decryption :%s", input); return 0; }
当前位置:网站首页>Implementation of Caesar cipher
Implementation of Caesar cipher
2020-11-07 20:19:00 【PamShao】
版权声明
本文为[PamShao]所创,转载请带上原文链接,感谢
边栏推荐
猜你喜欢
带你深入了解 GitLab CI/CD 原理及流程
技术总监7年自述——如何选择一家好公司
laravel8更新之维护模式改进
Using thread communication to solve the problem of cache penetrating database avalanche
DOM node operation
Win10官方1909版本无法打开windows安全中心中病毒和威胁防护的实时保护解决方案。
ajax 载入html后不能执行其中的js解决方法
After pulling four message queues into a group, they quarreled
课堂练习
深入浅出大前端框架Angular6实战教程(Angular6、node.js、keystonejs、
随机推荐
年薪90万程序员不如月入3800公务员?安稳与高收入,到底如何选择?
Code Review最佳实践
[graffiti footprints of Internet of things] mainstream communication mode of Internet of things
On the coverage technology and best practice of go code
凯撒密码实现
There's not much time left for Kwai Chung.
What kind of technical ability should a programmer who has worked for 1-3 years? How to improve?
Advanced concurrent programming series 9 (lock interface analysis)
Using rabbitmq to implement distributed transaction
站外推广的计划需要考虑哪些呢?
When tidb and Flink are combined: efficient and easy to use real-time data warehouse
统计文本中字母的频次(不区分大小写)
如何应对事关业务生死的数据泄露和删改?
Opencv computer vision learning (10) -- image transform (Fourier transform, high pass filter, low pass filter)
Reflection on a case of bus card being stolen and swiped
Facebook开源框架如何简化 PyTorch 实验
不要把异常当做业务逻辑,这性能可能你无法承受
使用“1”个参数调用“DownloadString”时发生异常:“操作超时”
AC86U kx上网
ajax 载入html后不能执行其中的js解决方法