#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]所创,转载请带上原文链接,感谢
边栏推荐
- DOM节点操作
- 编程界大佬教你:一行Python代码能做出哪些神奇的事情?
- 微服務 - 如何進行服務限流和熔斷
- Code Review Best Practices
- C语言I博客作业03
- 工作1-3年的程序员,应该具备怎么样的技术能力?该如何提升?
- 分享几个我日常使用的VS Code插件
- 全网最硬核讲解计算机启动流程
- Come on in! Take a few minutes to see how reentrantreadwritelock works!
- If you want to forget the WiFi network you used to connect to your Mac, try this!
猜你喜欢
use Xunit.DependencyInjection Transformation test project
利用线程通信、解决缓存穿透数据库雪崩
DOM node operation
vscode 配置
Rech8.0 learning days 12 rh134
一文详解微服务架构
Application and principle of handlermethodargumentresolver
Using LWA and lync to simulate external test edge free single front end environment
一次公交卡被“盜刷”事件帶來的思考
Reflection on a case of bus card being stolen and swiped
随机推荐
快進來!花幾分鐘看一下 ReentrantReadWriteLock 的原理!
Tips for Mac novices
Kylin on Kubernetes 在 eBay 的实践
[random talk] the goal and way of software design
Come on in! Take a few minutes to see how reentrantreadwritelock works!
HMS Core推送服务,助力电商App开展精细化运营
Andque.
Exception calling 'downloadstring' with '1' arguments: 'operation timed out'
DOM节点操作
Using thread communication to solve the problem of cache penetrating database avalanche
Don't treat exceptions as business logic, which you can't afford
Reflection on a case of bus card being stolen and swiped
In simple terms, the large front-end framework angular6 practical course (angular6 node.js 、keystonejs、
The official 1909 version of win10 cannot open the real-time protection solution of virus and threat protection in windows security center.
How to learn technology efficiently
bgfx编译教程
awk实现类sql的join操作
How Facebook open source framework simplifies pytorch experiment
Kubernetes (1): introduction to kubernetes
[original] the impact of arm platform memory and cache on the real-time performance of xenomai