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

📄 base64.h

📁 voltage 公司提供的一个开发Ibe的工具包
💻 H
字号:
/* Copyright 2003-2004, Voltage Security, all rights reserved.
 */

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

#ifndef _BASE_64_H
#define _BASE_64_H

#ifdef __cplusplus
extern "C" {
#endif

#define VOLT_BASE64_DEFAULT_BLOCK_SIZE  64
#define VOLT_BASE64_MAX_BIN_BLOCK_SIZE  57
#define VOLT_BASE64_MAX_ENC_BLOCK_SIZE  76

/* The local context for Base64.
 */
typedef struct
{
  VtBase64Info info;
  unsigned int newLineLen;
  unsigned int converterLen;
  UInt32 converter[4];
} VoltBase64Ctx;

/* Implements VGetEncodeOutputSize.
 */
int VOLT_CALLING_CONV Base64GetOutputSize VOLT_PROTO_LIST ((
   VoltAlgorithmObject *obj,
   unsigned int callFlag,
   unsigned char *input,
   unsigned int inputLen,
   unsigned int *outputSize,
   VtRandomObject random
));

/* Implements VEncodeInit.
 */
int VOLT_CALLING_CONV Base64EncodeInit VOLT_PROTO_LIST ((
   VoltAlgorithmObject *obj
));

/* Implements VEncodeUpdate.
 */
int VOLT_CALLING_CONV Base64EncodeUpdate VOLT_PROTO_LIST ((
   VoltAlgorithmObject *obj,
   VtRandomObject random,
   unsigned char *dataToEncode,
   unsigned int dataToEncodeLen,
   unsigned char *encoding,
   unsigned int *encodingLen
));

/* Implements VEncodeFinal.
 */
int VOLT_CALLING_CONV Base64EncodeFinal VOLT_PROTO_LIST ((
   VoltAlgorithmObject *obj,
   VtRandomObject random,
   unsigned char *encoding,
   unsigned int *encodingLen
));

/* Implements VDecodeInit.
 */
int VOLT_CALLING_CONV Base64DecodeInit VOLT_PROTO_LIST ((
   VoltAlgorithmObject *obj
));

/* Implements VDecodeUpdate.
 */
int VOLT_CALLING_CONV Base64DecodeUpdate VOLT_PROTO_LIST ((
   VoltAlgorithmObject *obj,
   VtRandomObject random,
   unsigned char *dataToDecode,
   unsigned int dataToDecodeLen,
   unsigned char *decoding,
   unsigned int *decodingLen
));

/* Implements VDecodeFinal.
 */
int VOLT_CALLING_CONV Base64DecodeFinal VOLT_PROTO_LIST ((
   VoltAlgorithmObject *obj,
   VtRandomObject random,
   unsigned char *decoding,
   unsigned int *decodingLen
));

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

#ifdef __cplusplus
}
#endif

#endif /* _BASE_64_H */

⌨️ 快捷键说明

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