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

📄 cbc.h

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

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

#ifndef _CBC_H
#define _CBC_H

#ifdef __cplusplus
extern "C" {
#endif

/* Implements VEncryptInit.
 */
int VOLT_CALLING_CONV CBCEncryptInit VOLT_PROTO_LIST ((
   VoltAlgorithmObject *algObj,
   VoltKeyObject *keyObj
));

/* Implements VEncryptUpdate.
 */
int VOLT_CALLING_CONV CBCEncryptUpdate VOLT_PROTO_LIST ((
   VoltAlgorithmObject *algObj,
   VtRandomObject random,
   unsigned char *dataToEncrypt,
   unsigned int dataToEncryptLen,
   unsigned char *encryptedData
));

/* Implments VDecryptInit.
 */
int VOLT_CALLING_CONV CBCDecryptInit VOLT_PROTO_LIST ((
   VoltAlgorithmObject *algObj,
   VoltKeyObject *keyObj
));

/* Implements VDecryptUpdate.
 */
int VOLT_CALLING_CONV CBCDecryptUpdate VOLT_PROTO_LIST ((
   VoltAlgorithmObject *algObj,
   VtRandomObject random,
   unsigned char *dataToDecrypt,
   unsigned int dataToDecryptLen,
   unsigned char *decryptedData
));

/* The feedCtx for CBC looks like this.
 */
typedef struct
{
  VoltFeedbackCtx feedCtx;
  VEncryptInit AlgEncryptInit;
  VEncryptUpdate AlgEncryptUpdate;
  VDecryptInit AlgDecryptInit;
  VDecryptUpdate AlgDecryptUpdate;
} VoltCbcCtx;

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

#ifdef __cplusplus
}
#endif

#endif /* _CBC_H */

⌨️ 快捷键说明

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