#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]所创,转载请带上原文链接,感谢
边栏推荐
- In simple terms, the large front-end framework angular6 practical course (angular6 node.js 、keystonejs、
- 浅谈HiZ-buffer
- Vscode configuration
- Andque.
- 某618大促项目的复盘总结
- 华为HCIA笔记
- 一次公交卡被“盜刷”事件帶來的思考
- 课堂练习
- [original] the impact of arm platform memory and cache on the real-time performance of xenomai
- There's not much time left for Kwai Chung.
猜你喜欢

C语言Ⅰ博客作业03

Exclusive interview with alicloud database of | 2020 PostgreSQL Asia Conference: Wang Xu

工作1-3年的程序员,应该具备怎么样的技术能力?该如何提升?

The CPU does this without the memory

Win10官方1909版本无法打开windows安全中心中病毒和威胁防护的实时保护解决方案。

某618大促项目的复盘总结

Advanced concurrent programming series 9 (lock interface analysis)

C语言I博客作业03

PHP安全:变量的前世今生

HMS Core推送服务,助力电商App开展精细化运营
随机推荐
11. Service update
vscode 配置
使用 Xunit.DependencyInjection 改造测试项目
9. Routingmesh service communication between clusters
某618大促项目的复盘总结
C enumerates the differences between permissions |, and |
从技术谈到管理,把系统优化的技术用到企业管理
阿里terway源码分析
There's not much time left for Kwai Chung.
[note] error while loading pyv8 binary: exit code 1 solution
HandlerMethodArgumentResolver使用和原理
Didi's distributed ID generator (tinyid), easy to use
Exclusive interview with Yue Caibo
栈-括号的匹配
How to deal with data leakage and deletion related to business life and death?
Let you have a deep understanding of gitlab CI / CD principle and process
是时候结束 BERTology了
一文详解微服务架构
MongoDB下,启动服务时,出现“服务没有响应控制功能”解决方法
Git代码提交操作,以及git push提示failed to push some refs'XXX'