![]() |
ARX
1.0
The next-generation open source augmented reality toolkit.
|
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <time.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include "zlib.h"
#include "crypt.h"
Macros | |
#define | CRC32(c, b) ((*(pcrc_32_tab+(((uint32_t)(c) ^ (b)) & 0xff))) ^ ((c) >> 8)) |
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) |
#define CRC32 | ( | c, | |
b | |||
) | ((*(pcrc_32_tab+(((uint32_t)(c) ^ (b)) & 0xff))) ^ ((c) >> 8)) |
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 | ||
) |
int cryptrand | ( | unsigned char * | buf, |
unsigned int | len | ||
) |
uint8_t decrypt_byte | ( | uint32_t * | pkeys | ) |
void init_keys | ( | const char * | passwd, |
uint32_t * | pkeys, | ||
const z_crc_t * | pcrc_32_tab | ||
) |
uint8_t update_keys | ( | uint32_t * | pkeys, |
const z_crc_t * | pcrc_32_tab, | ||
int32_t | c | ||
) |