⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sha1.h

📁 加密解密,安全工具!很有意思的代码
💻 H
字号:
/******************************************************************* * *	Copyright (c) 1994-1999 Jetico, Inc., Finland *	All rights reserved. * *	File: sha1.h *	Revision:  $Id: sha1.h,v 1.2 2002/10/29 07:11:46 crypt Rel-1.6-3 $ *	Created: *	Description: declaration of SHA-1 Secure Hash Algorithm  *		external procedures * *******************************************************************//* *	SHA1 message-digest algorithm. */#ifndef __SHA1_H__#define __SHA1_H__#define SHA1_DIGEST_SIZE  		20#define SHA1_ERROR_NO			0x0#define SHA1_ERROR_INTERNAL_ERROR	0x1typedef unsigned char byte;typedef unsigned int  DWORD;/* The structure for storing SHA context */typedef struct SHA1Context_{    DWORD digest[5];        /* Message digest */     DWORD countLo, countHi; /* 64-bit byte count */     DWORD data[16];         /* SHA data buffer */} SHA1Context;int SHA1Init(void   *context,              byte   *key,              size_t key_size);int SHA1Process(void   *context,                 byte   *data,                 size_t length);int SHA1Update(void *context, byte *data);int SHA1Final(void *context,               byte *digest);int SHA1Allocate(void **context);int SHA1Free(void **context);int SHA1MakeDigest( byte *message, int messageLength, byte *digest );/*  * On the Intel processors Circular Shift Left operation  * (Rotation Left) may be done as one command for processor *//* #define __INTEL_PLATFORM */#ifdef __INTEL_PLATFORM  #define ROL(X, n) _asm rol X, n#else  #define ROL( X, n )	( ( ( X ) << n ) | ( ( X ) >> ( 32 - n ) ) )#endif#endif /* __SHA1_H__ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -