- 3
- 0
- 约6.19千字
- 约 7页
- 2019-09-14 发布于广东
- 举报
卖殓二DES加密与解密算冻的实现
【实验目的】
1、 理解DES加密与解密的程序设计算法思想。
2、 加深对数据加密与解密的理解
3、 掌握DES加密算法思想,提高信息安全的编程能力
【实验内容】
编写DES加密与解密程序,实现对信息的加密与解密
源程序:
#include nstdio.hH
#include uiostream.hM
#include nmemory.hn
static void F_func(bool In[32], const bool Ki[48]);// F 函数
static void S_func(bool OuQ32], const bool In[48]);// S 盒代替
static void Transform(bool *Out, bool *In, const char *Table, int len);
static
void
Xor(bool *InA, const
bool
*InB, int
len);// 异或
static
void
RotateL(bool
*In, int
len,
int
loop);//
循坏左移
static
void
ByteToBit(bool
*Out,
const
char
*In,
int bits);
static
void
BitToByte(char
*Out,
const
boo
原创力文档

文档评论(0)