?? cfb.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 _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;
unsigned int bitCount;
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 + -