ARX  1.0
The next-generation open source augmented reality toolkit.
Loading...
Searching...
No Matches
Macros | Functions
crypt.c File Reference
#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"
Include dependency graph for crypt.c:

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)
 

Macro Definition Documentation

◆ CRC32

#define CRC32 (   c,
 
)    ((*(pcrc_32_tab+(((uint32_t)(c) ^ (b)) & 0xff))) ^ ((c) >> 8))

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 
)