xcr_stream.h
来自「IBE是一种非对称密码技术」· C头文件 代码 · 共 45 行
H
45 行
/* Copyright 2003-2006, Voltage Security, all rights reserved.
*/
#include "ictk.h"
#ifndef XCR_STREAM_H
#define XCR_STREAM_H
#ifdef __cplusplus
extern "C" {
#endif
/* byte-wise xor
*/
int xcrXor (
unsigned char *out,
unsigned char *in1,
unsigned char *in2,
unsigned int sz,
bf_context_t *bf
);
/* "one-time pad" stream cipher using SHA-1 as stream generator
*/
int xcrSHA1Stream (
unsigned char *out,
unsigned char *in,
unsigned int size,
unsigned char *key,
unsigned int key_sz,
bf_context_t *bf
);
/* Stream cipher encryption. Everywhere someone calls to StreamEncrypt
* or StreamDecrypt, just call SHA1Stream.
*/
#define xcrStreamEncrypt xcrSHA1Stream
#define xcrStreamDecrypt xcrSHA1Stream
#ifdef __cplusplus
}
#endif
#endif /* XCR_STREAM_H */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?