📄 cfb.h
字号:
/* Copyright 2003-2004, Voltage Security, all rights reserved.
*/
#include "vibecrypto.h"
#include "environment.h"
#include "base.h"
#include "libctx.h"
#include "algobj.h"
#include "keyobj.h"
#ifndef _CFB_H
#define _CFB_H
#ifdef __cplusplus
extern "C" {
#endif
/* Implements VEncryptInit.
*/
int VOLT_CALLING_CONV CFBEncryptInit VOLT_PROTO_LIST ((
VoltAlgorithmObject *algObj,
VoltKeyObject *keyObj
));
/* Implements VEncryptUpdate.
*/
int VOLT_CALLING_CONV CFBEncryptUpdateBlock VOLT_PROTO_LIST ((
VoltAlgorithmObject *algObj,
VtRandomObject random,
unsigned char *dataToEncrypt,
unsigned int dataToEncryptLen,
unsigned char *encryptedData
));
int VOLT_CALLING_CONV CFBEncryptUpdate1Bit VOLT_PROTO_LIST ((
VoltAlgorithmObject *algObj,
VtRandomObject random,
unsigned char *dataToEncrypt,
unsigned int dataToEncryptLen,
unsigned char *encryptedData
));
int VOLT_CALLING_CONV CFBEncryptUpdate8Bit VOLT_PROTO_LIST ((
VoltAlgorithmObject *algObj,
VtRandomObject random,
unsigned char *dataToEncrypt,
unsigned int dataToEncryptLen,
unsigned char *encryptedData
));
/* Implments VDecryptInit.
*/
int VOLT_CALLING_CONV CFBDecryptInit VOLT_PROTO_LIST ((
VoltAlgorithmObject *algObj,
VoltKeyObject *keyObj
));
/* Implements VDecryptUpdate.
*/
int VOLT_CALLING_CONV CFBDecryptUpdateBlock VOLT_PROTO_LIST ((
VoltAlgorithmObject *algObj,
VtRandomObject random,
unsigned char *dataToDecrypt,
unsigned int dataToDecryptLen,
unsigned char *decryptedData
));
int VOLT_CALLING_CONV CFBDecryptUpdate1Bit VOLT_PROTO_LIST ((
VoltAlgorithmObject *algObj,
VtRandomObject random,
unsigned char *dataToDecrypt,
unsigned int dataToDecryptLen,
unsigned char *decryptedData
));
int VOLT_CALLING_CONV CFBDecryptUpdate8Bit VOLT_PROTO_LIST ((
VoltAlgorithmObject *algObj,
VtRandomObject random,
unsigned char *dataToDecrypt,
unsigned int dataToDecryptLen,
unsigned char *decryptedData
));
/* The feedCtx for CFB looks like this.
* Note: The xorUsed field is measured in bytes. For 1 or 8-bit
* transfer sizes, the xorUsed is not applicable. Because it is only
* for the full blockSize version, it might as well be in bytes.
*/
typedef struct
{
VoltFeedbackCtx feedCtx;
unsigned char *currentVector;
unsigned int xorUsed;
unsigned int transferSizeBits;
VEncryptInit AlgEncryptInit;
VEncryptUpdate AlgEncryptUpdate;
} VoltCFBCtx;
/* Implements VCtxDestroy.
*/
void VOLT_CALLING_CONV CFBFeedCtxDestroy VOLT_PROTO_LIST ((
Pointer obj,
Pointer ctx
));
#ifdef __cplusplus
}
#endif
#endif /* _CFB_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -