#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]所创,转载请带上原文链接,感谢
边栏推荐
- graph generation model
- 盘点那些争议最大的编程观点,你是什么看法呢?
- 建议患者自杀,OpenAI警告:GPT-3用于医疗目的风险太高
- 课堂练习
- The JS solution cannot be executed after Ajax loads HTML
- 屏读时代,我们患上了注意力缺失候群症
- Don't treat exceptions as business logic, which you can't afford
- 我们为什么需要软件工程——从一个简单的项目进行观察
- awk实现类sql的join操作
- There's not much time left for Kwai Chung.
猜你喜欢
随机推荐
Kubernetes (1): introduction to kubernetes
The CPU does this without the memory
HMS Core推送服务,助力电商App开展精细化运营
Web API series (3) unified exception handling
[random talk] the goal and way of software design
Don't treat exceptions as business logic, which you can't afford
CPU瞒着内存竟干出这种事
我们为什么需要软件工程——从一个简单的项目进行观察
How Facebook open source framework simplifies pytorch experiment
What kind of technical ability should a programmer who has worked for 1-3 years? How to improve?
「混合云」会是云计算的下一个战场吗?
一文详解微服务架构
DOM节点操作
Blazor 準備好為企業服務了嗎?
Kylin on kubernetes' practice on eBay
高级并发编程系列九(Lock接口分析)
栈-括号的匹配
如何以计算机的方式去思考
凯撒密码实现
In simple terms, the large front-end framework angular6 practical course (angular6 node.js 、keystonejs、