File: crypt.h

package info (click to toggle)
binkd 1.1a-115-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,544 kB
  • sloc: ansic: 22,961; makefile: 1,126; perl: 368; sh: 320
file content (13 lines) | stat: -rw-r--r-- 469 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
#ifndef _BINKD_CRYPT_H_
#define _BINKD_CRYPT_H_

#define CRC32(c, b) (crc_32_tab[((int)(c) ^ (b)) & 0xff] ^ ((c) >> 8))
extern unsigned long crc_32_tab[256];

int  update_keys (unsigned long keys[3], int c);
void init_keys (unsigned long keys[3], const char *passwd);
int  decrypt_byte (unsigned long keys[3]);
void decrypt_buf (char *buf, unsigned int bufsize, unsigned long keys[3]);
void encrypt_buf (char *buf, unsigned int bufsize, unsigned long keys[3]);

#endif