#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]所创,转载请带上原文链接,感谢
边栏推荐
- 利用线程通信、解决缓存穿透数据库雪崩
- Vue: Axios uses this pointer
- What is the relationship between low code vs model driven?
- Key points of C language -- index article (let you fully understand indicators) | understand indicators from memory | complete analysis of indicators
- HandlerMethodArgumentResolver使用和原理
- How to learn technology efficiently
- Using LWA and lync to simulate external test edge free single front end environment
- vue踩坑:axios使用this指针
- Don't treat exceptions as business logic, which you can't afford
- Technical debt is a lack of real understanding of business functions- daverupert.com
猜你喜欢
随机推荐
盘点那些争议最大的编程观点,你是什么看法呢?
Web API series (3) unified exception handling
Deep into web workers (1)
HMS core push service helps e-commerce app to carry out refined operation
Chinese sub forum of | 2020 PostgreSQL Asia Conference: Pan Juan
一文详解微服务架构
C语言Ⅰ博客作业03
CPU瞒着内存竟干出这种事
是时候结束 BERTology了
Vue: Axios uses this pointer
在 Amazon SageMaker 管道模式下使用 Horovod 实现多 GPU 分布式训练
低代码 vs 模型驱动,它们之间到底是什么关系?
OpenCV計算機視覺學習(10)——影象變換(傅立葉變換,高通濾波,低通濾波)
PHP安全:变量的前世今生
统计文本中字母的频次(不区分大小写)
MongoDB下,启动服务时,出现“服务没有响应控制功能”解决方法
How to deal with data leakage and deletion related to business life and death?
从技术谈到管理,把系统优化的技术用到企业管理
动态规划——用二进制表示集合的状态压缩DP
Using LWA and lync to simulate external test edge free single front end environment





