Back to index

tetex-bin  3.0
Defines | Functions
t1crypt.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define EEKEY   55665u
#define CHARKEY   4330u

Functions

unsigned char t1_encrypt (unsigned char plain)
void t1_crypt_init (unsigned short int key)
unsigned char t1_decrypt (unsigned char cipher)

Define Documentation

#define CHARKEY   4330u

Definition at line 5 of file t1crypt.h.

#define EEKEY   55665u

Definition at line 4 of file t1crypt.h.


Function Documentation

void t1_crypt_init ( unsigned short int  key)

Definition at line 15 of file t1crypt.c.

{
  r = key;
}

Here is the caller graph for this function:

unsigned char t1_decrypt ( unsigned char  cipher)

Definition at line 20 of file t1crypt.c.

{
  unsigned char plain;
  plain = (cipher ^ (r>>8));
  r = (cipher+r)*c1 + c2;
  return plain;
}

Here is the caller graph for this function:

unsigned char t1_encrypt ( unsigned char  plain)

Definition at line 7 of file t1crypt.c.

{
  unsigned char cipher;
  cipher = (plain ^ (r >> 8));
  r = (cipher+r)*c1 + c2;
  return cipher;
}

Here is the caller graph for this function: