资源简介
DES文件加密传输
通过把数据进行MD5加密,加密后的MD5码再进行DES数据加密,然后通过文件结构信息把加密后的DES信息进行传输,在接收端把获得的文件再进行加密然后与文件结构信息的加密码进行比对。

代码片段和文件信息
#include “stdafx.h“
#include
#include
#include
#include
#include
#include “md5.h“
/* POINTER defines a generic pointer type */
typedef unsigned char *POINTER;
/* UINT2 defines a two byte word */
typedef unsigned short int UINT2;
/* UINT4 defines a four byte word */
typedef unsigned long int UINT4;
#define PROTO_LIST(list) list
/* MD5 context. */
typedef struct _MD5_CTX
{
UINT4 state[4]; /* state (ABCD) */
UINT4 count[2]; /* number of bits modulo 2^64 (lsb first) */
unsigned char buffer[64]; /* input buffer */
} MD5_CTX;
/* Constants for MD5Transform routine.
*/
#define S11 7
#define S12 12
#define S13 17
#define S14 22
#define S21 5
#define S22 9
#define S23 14
#define S24 20
#define S31 4
#define S32 11
#define S33 16
#define S34 23
#define S41 6
#define S42 10
#define S43 15
#define S44 21
static unsigned char PADDING[64] = {
0x80 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
};
/* F G H and I are basic MD5 functions.
*/
#define F(x y z) (((x) & (y)) | ((~x) & (z)))
#define G(x y z) (((x) & (z)) | ((y) & (~z)))
#define H(x y z) ((x) ^ (y) ^ (z))
#define I(x y z) ((y) ^ ((x) | (~z)))
/* ROTATE_LEFT rotates x left n bits.
*/
#define ROTATE_LEFT(x n) (((x) << (n)) | ((x) >> (32-(n))))
/* FF GG HH and II transformations for rounds 1 2 3 and 4.
Rotation is separate from addition to prevent recomputation.
*/
#define FF(a b c d x s ac) { \
(a) += F ((b) (c) (d)) + (x) + (UINT4)(ac);\
(a) = ROTATE_LEFT ((a) (s)); \
(a) += (b); \
}
#define GG(a b c d x s ac) { \
(a) += G ((b) (c) (d)) + (x) + (UINT4)(ac); \
(a) = ROTATE_LEFT ((a) (s)); \
(a) += (b); \
}
#define HH(a b c d x s ac) { \
(a) += H ((b) (c) (d)) + (x) + (UINT4)(ac); \
(a) = ROTATE_LEFT ((a) (s)); \
(a) += (b); \
}
#define II(a b c d x s ac) { \
(a) += I ((b) (c) (d)) + (x) + (UINT4)(ac); \
(a) = ROTATE_LEFT ((a) (s)); \
(a) += (b); \
}
#define TEST_BLOCK_LEN 1000
#define TEST_BLOCK_COUNT 1000
static void MD5Transform PROTO_LIST ((UINT4 [4] unsigned char [64]));
static void Encode PROTO_LIST ((unsigned char * UINT4 * unsigned int));
static void Decode PROTO_LIST ((UINT4 * unsigned char * unsigned int));
static void MD5_memcpy PROTO_LIST ((POINTER POINTER unsigned int));
static void MD5_memset PROTO_LIST ((POINTER int unsigned int));
static void MD5Init PROTO_LIST ((MD5_CTX *));
static void MD5Update PROTO_LIST ((MD5_CTX * unsigned char * unsigned int));
static void MD5Final PROTO_LIST ((unsigned char [16] MD5_CTX *));
static void MDTimeTrial PROTO_LIST ((void));
static void StringAddOne PROTO_LIST ((char *));
static void Encode PROTO_LIST ((unsigned char * UINT4 * unsigned int));
static void Decode PROTO_LIST ((UINT4 * unsigned c
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 74752 2004-12-25 13:18 1.Transfer_DES\source code\TransClient\Client.ncb
文件 53760 2004-12-25 13:18 1.Transfer_DES\source code\TransClient\Client.opt
文件 14354 2012-05-24 22:30 1.Transfer_DES\source code\TransClient\Debug\md5.obj
文件 0 2012-05-24 22:30 1.Transfer_DES\source code\TransClient\Debug\md5.sbr
文件 26196 2012-05-25 00:10 1.Transfer_DES\source code\TransClient\Debug\schedle.obj
文件 0 2012-05-25 00:10 1.Transfer_DES\source code\TransClient\Debug\schedle.sbr
文件 106746 2012-05-23 18:02 1.Transfer_DES\source code\TransClient\Debug\StdAfx.obj
文件 1391540 2012-05-23 18:02 1.Transfer_DES\source code\TransClient\Debug\StdAfx.sbr
文件 5440512 2012-05-25 10:24 1.Transfer_DES\source code\TransClient\Debug\TransClient.bsc
文件 127065 2012-05-25 10:24 1.Transfer_DES\source code\TransClient\Debug\TransClient.exe
文件 285744 2012-05-25 10:24 1.Transfer_DES\source code\TransClient\Debug\TransClient.ilk
文件 13410 2012-05-24 20:13 1.Transfer_DES\source code\TransClient\Debug\TransClient.obj
文件 6941372 2012-05-23 18:02 1.Transfer_DES\source code\TransClient\Debug\TransClient.pch
文件 394240 2012-05-25 10:24 1.Transfer_DES\source code\TransClient\Debug\TransClient.pdb
文件 2428 2012-05-23 18:02 1.Transfer_DES\source code\TransClient\Debug\TransClient.res
文件 0 2012-05-24 20:13 1.Transfer_DES\source code\TransClient\Debug\TransClient.sbr
文件 27213 2012-05-25 10:24 1.Transfer_DES\source code\TransClient\Debug\TransClientDlg.obj
文件 0 2012-05-25 10:24 1.Transfer_DES\source code\TransClient\Debug\TransClientDlg.sbr
文件 222208 2012-05-25 10:37 1.Transfer_DES\source code\TransClient\Debug\vc60.idb
文件 364544 2012-05-25 10:24 1.Transfer_DES\source code\TransClient\Debug\vc60.pdb
文件 11386 2012-01-27 13:46 1.Transfer_DES\source code\TransClient\md5.cpp
文件 139 2007-03-31 15:02 1.Transfer_DES\source code\TransClient\md5.h
文件 3669 2004-12-25 13:32 1.Transfer_DES\source code\TransClient\ReadMe.txt
文件 1078 2006-02-23 11:16 1.Transfer_DES\source code\TransClient\res\TransClient.ico
文件 403 2004-12-25 13:32 1.Transfer_DES\source code\TransClient\res\TransClient.rc2
文件 734 2006-02-23 11:28 1.Transfer_DES\source code\TransClient\resource.h
文件 9773 2007-04-20 20:44 1.Transfer_DES\source code\TransClient\schedle.cpp
文件 977 2007-03-25 15:37 1.Transfer_DES\source code\TransClient\schedle.h
文件 932 2006-02-23 11:21 1.Transfer_DES\source code\TransClient\sf.cpp
文件 1173 2006-02-23 11:20 1.Transfer_DES\source code\TransClient\sf.h
............此处省略69个文件信息
- 上一篇:5g为人工智能与智能制造赋能.pdf
- 下一篇:多普达575刷机工具
相关资源
- Remote Desktop Organizer v1.4.7 支持win10
- Openssl给文件传输加密
- 3des加解密_C 实现
- tftp文件传输工具
- RSA AES DES ECC加密算法源码
- 密码学课程设计:DES加密解密算法的
- 提供几个加密算法的源码
- DES IP置换IP逆置换
- DES的C 源码
- socket文件传输源码
- Design of Analog CMOS Integrated Circuits 拉扎
- codesys编程手册中文版
- System Design Interview - An Insider’s Guide
- Grokking the System Design Interview
- 翻译的美国大学经典参考书,Roland
- 认识界面以及PCB设计整体要求
- The Research on Smart Drill-in Fluid Design
- 埃塞俄比亚东北部Dessie转诊医院的糖
- Altium designer超全元件库+封装库部分
- dive into design patterns(Alexander Shvets)
- Antenna Theory Analysis and Design.3rd Edition
- FMEDesktop2019特别版forMacv2019.0.0.0.19181苹
- LANDesk 管理解决方案和采用英特尔:r
- Mentor Graphics Expedition Enterprise v7.9.5.r
- PowerDesigner16.6 破解补丁
- Altium Designer实战攻略与高速PCB设计P
- 复旦dc综合工具教程
- lotus domino notes(包括client administrato
- Type-c 接口封装,24引脚,Altium Design
- Behavior Designer 1.6.3(u2018.3.0).unitypa
评论
共有 条评论