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

📄 md5.h

📁 IBE是一种非对称密码技术
💻 H
字号:
/* Copyright 2003-2006, Voltage Security, all rights reserved.
 */

#include "vibecrypto.h"
#include "environment.h"
#include "base.h"
#include "libctx.h"

#ifndef _MD5_H
#define _MD5_H

#ifdef __cplusplus
extern "C" {
#endif

/* The bulk of MD5 is done by a Transform function. This may be a
 * separate function, some implementation may "inline" it.
 *
 * @param ctx The MD5 context.
 * @param block The block of data to use in updating the state.
 * @return none
 */
typedef void VOLT_CALLING_CONV (*VMD5Transform) VOLT_PROTO_LIST ((
   Pointer ctx,
   unsigned char *block
));

/* This is the standard MD5 context.
 */
typedef struct
{
  UInt32 state[4];
  UInt32 countLow;
  UInt32 countHigh;
  UInt32 xBlock[16];
  unsigned char currentBlock[64];
  unsigned int currentBlockLen;
  VMD5Transform MD5Transform;
} VoltMD5Ctx;

/* Implements VDigestInit.
 */
int VOLT_CALLING_CONV MD5Init VOLT_PROTO_LIST ((
   VoltAlgorithmObject *obj
));

/* Implements VDigestUpdate.
 */
int VOLT_CALLING_CONV MD5Update VOLT_PROTO_LIST ((
   VoltAlgorithmObject *obj,
   unsigned char *dataToDigest,
   unsigned int dataToDigestLen
));

/* Implements VDigestFinal.
 */
int VOLT_CALLING_CONV MD5Final VOLT_PROTO_LIST ((
   VoltAlgorithmObject *obj,
   unsigned char *digest
));

/* Implements VMD5Transform.
 */
void VOLT_CALLING_CONV MD5Transform VOLT_PROTO_LIST ((
   Pointer ctx,
   unsigned char *block
));

/* Implements VCtxDestroy.
 */
void VOLT_CALLING_CONV MD5ClassCtxDestroy VOLT_PROTO_LIST ((
   Pointer obj,
   Pointer ctx
));

#ifdef __cplusplus
}
#endif

#endif /* _MD5_H */

⌨️ 快捷键说明

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