代码语言
.
CSharp
.
JS
Java
Asp.Net
C
MSSQL
PHP
Css
PLSQL
Python
Shell
EBS
ASP
Perl
ObjC
VB.Net
VBS
MYSQL
GO
Delphi
AS
DB2
Domino
Rails
ActionScript
Scala
代码分类
文件
系统
字符串
数据库
网络相关
图形/GUI
多媒体
算法
游戏
Jquery
Extjs
Android
HTML5
菜单
网页交互
WinForm
控件
企业应用
安全与加密
脚本/批处理
开放平台
其它
【
C
】
Windows的NTLM认证方式的加密和解密库
作者:
DDT
/ 发布于
2012/7/16
/
671
Windows的NTLM认证方式的加密和解密库
<div>/* d3des.h - * * Headers and defines for d3des.c * Graven Imagery, 1992. * * Copyright (c) 1988,1989,1990,1991,1992 by Richard Outerbridge * (GEnie : OUTER; CIS : [71755,204]) */ #define D2_DES /* include double-length support */ #define D3_DES /* include triple-length support */ #ifdef D3_DES #ifndef D2_DES #define D2_DES /* D2_DES is needed for D3_DES */ #endif #endif #define EN0 0 /* MODE == encrypt */ #define DE1 1 /* MODE == decrypt */ /* A useful alias on 68000-ish machines, but NOT USED HERE. */ typedef union { unsigned long blok[2]; unsigned short word[4]; unsigned char byte[8]; } M68K; extern void deskey(unsigned char *, short); /* hexkey[8] MODE * Sets the internal key register according to the hexadecimal * key contained in the 8 bytes of hexkey, according to the DES, * for encryption or decryption according to MODE. */ extern void usekey(unsigned long *); /* cookedkey[32] * Loads the internal key register with the data in cookedkey. */ extern void cpkey(unsigned long *); /* cookedkey[32] * Copies the contents of the internal key register into the storage * located at &cookedkey[0]. */ extern void des(unsigned char *, unsigned char *); /* from[8] to[8] * Encrypts/Decrypts (according to the key currently loaded in the * internal key register) one block of eight bytes at address 'from' * into the block at address 'to'. They can be the same. */ #ifdef D2_DES #define desDkey(a,b) des2key((a),(b)) extern void des2key(unsigned char *, short); /* hexkey[16] MODE * Sets the internal key registerS according to the hexadecimal * keyS contained in the 16 bytes of hexkey, according to the DES, * for DOUBLE encryption or decryption according to MODE. * NOTE: this clobbers all three key registers! */ extern void Ddes(unsigned char *, unsigned char *); /* from[8] to[8] * Encrypts/Decrypts (according to the keyS currently loaded in the * internal key registerS) one block of eight bytes at address 'from' * into the block at address 'to'. They can be the same. */ extern void D2des(unsigned char *, unsigned char *); /* from[16] to[16] * Encrypts/Decrypts (according to the keyS currently loaded in the * internal key registerS) one block of SIXTEEN bytes at address 'from' * into the block at address 'to'. They can be the same. */ extern void makekey(char *, unsigned char *); /* *password, single-length key[8] * With a double-length default key, this routine hashes a NULL-terminated * string into an eight-byte random-looking key, suitable for use with the * deskey() routine. */ #define makeDkey(a,b) make2key((a),(b)) extern void make2key(char *, unsigned char *); /* *password, double-length key[16] * With a double-length default key, this routine hashes a NULL-terminated * string into a sixteen-byte random-looking key, suitable for use with the * des2key() routine. */ #ifndef D3_DES /* D2_DES only */ #define useDkey(a) use2key((a)) #define cpDkey(a) cp2key((a)) extern void use2key(unsigned long *); /* cookedkey[64] * Loads the internal key registerS with the data in cookedkey. * NOTE: this clobbers all three key registers! */ extern void cp2key(unsigned long *); /* cookedkey[64] * Copies the contents of the internal key registerS into the storage * located at &cookedkey[0]. */ #else /* D3_DES too */ #define useDkey(a) use3key((a)) #define cpDkey(a) cp3key((a)) extern void des3key(unsigned char *, short); /* hexkey[24] MODE * Sets the internal key registerS according to the hexadecimal * keyS contained in the 24 bytes of hexkey, according to the DES, * for DOUBLE encryption or decryption according to MODE. */ extern void use3key(unsigned long *); /* cookedkey[96] * Loads the 3 internal key registerS with the data in cookedkey. */ extern void cp3key(unsigned long *); /* cookedkey[96] * Copies the contents of the 3 internal key registerS into the storage * located at &cookedkey[0]. */ extern void make3key(char *, unsigned char *); /* *password, triple-length key[24] * With a triple-length default key, this routine hashes a NULL-terminated * string into a twenty-four-byte random-looking key, suitable for use with * the des3key() routine. */ #endif /* D3_DES */ #endif /* D2_DES */ /* d3des.h V5.09 rwo 9208.04 15:06 Graven Imagery ********************************************************************/ </div>
试试其它关键字
加密和解密库
同语言下
.
获取手机通讯录 iOS去除数字以外的所有字符
.
异步加载音乐等资源
.
交通罚单管理系统
.
freemark实现,简单的替换
.
计算斐波那契数列
.
base64解码 包括解码长度
.
图像显示
.
冒泡排序
.
输入十进制数,输出指定进制
.
链式栈
可能有用的
.
C#实现的html内容截取
.
List 切割成几份 工具类
.
SQL查询 多列合并成一行用逗号隔开
.
一行一行读取txt的内容
.
C#动态修改文件夹名称(FSO实现,不移动文件)
.
c# 移动文件或文件夹
.
c#图片添加水印
.
Java PDF转换成图片并输出给前台展示
.
网站后台修改图片尺寸代码
.
处理大图片在缩略图时的展示
DDT
贡献的其它代码
(
160
)
.
Oracle统计表的数据行和数据块信息
.
html标签闭合检测与修复
.
Powershell日期计算
.
Powershell的Base64编解码
.
Powershell并行循环
.
Powershell目录中搜索文本
.
Powershell枚举远程机器上的本地权限组
.
VBScript解析csv文件
.
快速排序之Powershell
.
批处理输出格式化时间字符串
Copyright © 2004 - 2024 dezai.cn. All Rights Reserved
站长博客
粤ICP备13059550号-3