22#if ZLIB_VERNUM < 0x1270
30#define RAND_HEAD_LEN 12
34#define zdecode(pkeys,pcrc_32_tab,c) \
35 (update_keys(pkeys,pcrc_32_tab, c ^= decrypt_byte(pkeys)))
37#define zencode(pkeys,pcrc_32_tab,c,t) \
38 (t = decrypt_byte(pkeys), update_keys(pkeys,pcrc_32_tab,c), t^(c))
49void init_keys(
const char *passwd, uint32_t *pkeys,
const z_crc_t *pcrc_32_tab);
53int cryptrand(
unsigned char *buf,
unsigned int len);
56int crypthead(
const char *passwd, uint8_t *buf,
int buf_size, uint32_t *pkeys,
57 const z_crc_t *pcrc_32_tab, uint8_t verify1, uint8_t verify2);
unsigned long z_crc_t
Definition: crypt.h:23
int crypthead(const char *passwd, uint8_t *buf, int buf_size, uint32_t *pkeys, const z_crc_t *pcrc_32_tab, uint8_t verify1, uint8_t verify2)
Definition: crypt.c:119
uint8_t update_keys(uint32_t *pkeys, const z_crc_t *pcrc_32_tab, int32_t c)
Definition: crypt.c:61
int cryptrand(unsigned char *buf, unsigned int len)
Definition: crypt.c:88
void init_keys(const char *passwd, uint32_t *pkeys, const z_crc_t *pcrc_32_tab)
Definition: crypt.c:73
uint8_t decrypt_byte(uint32_t *pkeys)
Definition: crypt.c:51