| ARX 1.0 The next-generation open source augmented reality toolkit.

Loading...
Searching...
No Matches
Macros | Typedefs | Functions
crypt.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Macros
#define | RAND_HEAD_LEN 12
#define | zdecode(pkeys, pcrc_32_tab, c) (update_keys(pkeys,pcrc_32_tab, c ^= decrypt_byte(pkeys)))
#define | zencode(pkeys, pcrc_32_tab, c, t) (t = decrypt_byte(pkeys), update_keys(pkeys,pcrc_32_tab,c), t^(c))

## Typedefs
typedef unsigned long | z_crc_t

## Functions
uint8_t | decrypt_byte (uint32_t *pkeys)
uint8_t | update_keys (uint32_t *pkeys, const z_crc_t *pcrc_32_tab, int32_t c)
void | init_keys (const char *passwd, uint32_t *pkeys, const z_crc_t *pcrc_32_tab)
int | cryptrand (unsigned char *buf, unsigned int len)
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)

## Macro Definition Documentation

## ◆ RAND_HEAD_LEN

#define RAND_HEAD_LEN 12

## ◆ zdecode

#define zdecode | ( |  | pkeys,
|  |  | pcrc_32_tab,
|  |  | c
| ) |  | (update_keys(pkeys,pcrc_32_tab, c ^= decrypt_byte(pkeys)))

## ◆ zencode

#define zencode | ( |  | pkeys,
|  |  | pcrc_32_tab,
|  |  | c,
|  |  | t
| ) |  | (t = decrypt_byte(pkeys), update_keys(pkeys,pcrc_32_tab,c), t^(c))

## Typedef Documentation

## ◆ z_crc_t

typedef unsigned long z_crc_t

## Function Documentation

## ◆ crypthead()

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
| ) |  |

Here is the call graph for this function:

## ◆ cryptrand()

int cryptrand | ( | unsigned char * | buf,
|  | unsigned int | len
| ) |  |

## ◆ decrypt_byte()

uint8_t decrypt_byte | ( | uint32_t * | pkeys | ) |

## ◆ init_keys()

void init_keys | ( | const char * | passwd,
|  | uint32_t * | pkeys,
|  | const z_crc_t * | pcrc_32_tab
| ) |  |

Here is the call graph for this function:

## ◆ update_keys()

uint8_t update_keys | ( | uint32_t * | pkeys,
|  | const z_crc_t * | pcrc_32_tab,
|  | int32_t | c
| ) |  |