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

📄 xcr_stream.h

📁 IBE是一种非对称密码技术
💻 H
字号:
/* 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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -