![]() |
DarkPlaces
Game engine based on the Quake 1 engine by id Software, developed by LadyHavoc
|
|
#include <d0_blind_id/d0_blind_id.h>
#include <ctype.h>
#include <stdio.h>
#include <unistd.h>
#include <getopt.h>
#include <string.h>
#include <stdlib.h>
#include <signal.h>
#include <math.h>
#include <sys/types.h>
#include <sys/stat.h>
Go to the source code of this file.
Macros | |
#define | _GNU_SOURCE |
#define | CHECK(x) |
#define | FOURCC_D0ER (('d' << 0) | ('0' << 8) | ('e' << 16) | ('r' << 24)) |
#define | FOURCC_D0IC (('d' << 0) | ('0' << 8) | ('i' << 16) | ('c' << 24)) |
#define | FOURCC_D0IQ (('d' << 0) | ('0' << 8) | ('i' << 16) | ('q' << 24)) |
#define | FOURCC_D0IR (('d' << 0) | ('0' << 8) | ('i' << 16) | ('r' << 24)) |
#define | FOURCC_D0PI (('d' << 0) | ('0' << 8) | ('p' << 16) | ('i' << 24)) |
#define | FOURCC_D0PK (('d' << 0) | ('0' << 8) | ('p' << 16) | ('k' << 24)) |
#define | FOURCC_D0SI (('d' << 0) | ('0' << 8) | ('s' << 16) | ('i' << 24)) |
#define | FOURCC_D0SK (('d' << 0) | ('0' << 8) | ('s' << 16) | ('k' << 24)) |
Typedefs | |
typedef D0_BOOL(* | fingerprint_func) (const d0_blind_id_t *ctx, char *outbuf, size_t *outbuflen) |
Functions | |
int | buf2file (const char *fn, const char *data, size_t n) |
static unsigned long | Crypto_LittleLong (const char *data) |
static size_t | Crypto_ParsePack (const char *buf, size_t len, unsigned long header, const char **lumps, size_t *lumpsize, size_t nlumps) |
static void | Crypto_UnLittleLong (char *data, unsigned long l) |
static size_t | Crypto_UnParsePack (char *buf, size_t len, unsigned long header, const char *const *lumps, const size_t *lumpsize, size_t nlumps) |
D0_BOOL | fastreject (const d0_blind_id_t *ctx, void *pass) |
void | file2buf (const char *fn, char **data, size_t *datasize) |
void | file2lumps (const char *fn, unsigned long header, const char **lumps, size_t *lumpsize, size_t nlumps) |
void | lumps2file (const char *fn, unsigned long header, const char *const *lumps, size_t *lumpsize, size_t nlumps, D0_BOOL private) |
int | main (int argc, char **argv) |
void | print_generated (int signo) |
void | USAGE (const char *me) |
Variables | |
unsigned int | generated |
double | generated_offset |
double | guesscount |
double | guessfactor |
int | ignorecase |
const char * | infix = NULL |
unsigned int | ntasks = 1 |
const char * | prefix = NULL |
size_t | prefixlen = 0 |
unsigned int | seconds |
mode_t | umask_save |
#define _GNU_SOURCE |
Definition at line 1 of file crypto-keygen-standalone.c.
#define CHECK | ( | x | ) |
Definition at line 237 of file crypto-keygen-standalone.c.
Referenced by fastreject(), and main().
#define FOURCC_D0ER (('d' << 0) | ('0' << 8) | ('e' << 16) | ('r' << 24)) |
Definition at line 23 of file crypto-keygen-standalone.c.
#define FOURCC_D0IC (('d' << 0) | ('0' << 8) | ('i' << 16) | ('c' << 24)) |
Definition at line 24 of file crypto-keygen-standalone.c.
Referenced by main().
#define FOURCC_D0IQ (('d' << 0) | ('0' << 8) | ('i' << 16) | ('q' << 24)) |
Definition at line 21 of file crypto-keygen-standalone.c.
Referenced by main().
Definition at line 22 of file crypto-keygen-standalone.c.
Referenced by main().
#define FOURCC_D0PI (('d' << 0) | ('0' << 8) | ('p' << 16) | ('i' << 24)) |
Definition at line 19 of file crypto-keygen-standalone.c.
Referenced by main().
#define FOURCC_D0PK (('d' << 0) | ('0' << 8) | ('p' << 16) | ('k' << 24)) |
Definition at line 17 of file crypto-keygen-standalone.c.
Referenced by main().
#define FOURCC_D0SI (('d' << 0) | ('0' << 8) | ('s' << 16) | ('i' << 24)) |
Definition at line 20 of file crypto-keygen-standalone.c.
Referenced by main().
#define FOURCC_D0SK (('d' << 0) | ('0' << 8) | ('s' << 16) | ('k' << 24)) |
Definition at line 18 of file crypto-keygen-standalone.c.
Referenced by main().
typedef D0_BOOL(* fingerprint_func) (const d0_blind_id_t *ctx, char *outbuf, size_t *outbuflen) |
Definition at line 242 of file crypto-keygen-standalone.c.
int buf2file | ( | const char * | fn, |
const char * | data, | ||
size_t | n ) |
Definition at line 126 of file crypto-keygen-standalone.c.
References data, f, fclose(), fopen(), and n.
Referenced by lumps2file(), and main().
|
static |
Definition at line 26 of file crypto-keygen-standalone.c.
References data.
Referenced by Crypto_ParsePack().
|
static |
Definition at line 43 of file crypto-keygen-standalone.c.
References buf, Crypto_LittleLong(), and i.
Referenced by file2lumps().
|
static |
Definition at line 35 of file crypto-keygen-standalone.c.
References data.
Referenced by Crypto_UnParsePack().
|
static |
Definition at line 70 of file crypto-keygen-standalone.c.
References buf, Crypto_UnLittleLong(), and i.
Referenced by lumps2file().
D0_BOOL fastreject | ( | const d0_blind_id_t * | ctx, |
void * | pass ) |
Definition at line 243 of file crypto-keygen-standalone.c.
References CHECK, generated, ignorecase, infix, prefix, and prefixlen.
Referenced by main().
void file2buf | ( | const char * | fn, |
char ** | data, | ||
size_t * | datasize ) |
Definition at line 94 of file crypto-keygen-standalone.c.
References data, f, fclose(), fopen(), n, and NULL.
Referenced by file2lumps(), and main().
void file2lumps | ( | const char * | fn, |
unsigned long | header, | ||
const char ** | lumps, | ||
size_t * | lumpsize, | ||
size_t | nlumps ) |
Definition at line 141 of file crypto-keygen-standalone.c.
References buf, Crypto_ParsePack(), file2buf(), and n.
Referenced by main().
void lumps2file | ( | const char * | fn, |
unsigned long | header, | ||
const char *const * | lumps, | ||
size_t * | lumpsize, | ||
size_t | nlumps, | ||
D0_BOOL | private ) |
Definition at line 161 of file crypto-keygen-standalone.c.
References buf, buf2file(), Crypto_UnParsePack(), n, and umask_save.
Referenced by main().
Definition at line 275 of file crypto-keygen-standalone.c.
References argv(), buf, buf2file(), CHECK, D0_BOOL, fastreject(), fgets(), file2buf(), file2lumps(), FOURCC_D0IC, FOURCC_D0IQ, FOURCC_D0IR, FOURCC_D0PI, FOURCC_D0PK, FOURCC_D0SI, FOURCC_D0SK, generated, generated_offset, guesscount, guessfactor, i, ignorecase, infix, int(), log(), lumps2file(), mask, ntasks, NULL, outfile, pow(), prefix, prefixlen, print_generated(), seconds, sprintf, strlen(), umask_save, and USAGE().
Definition at line 212 of file crypto-keygen-standalone.c.
References generated, generated_offset, guesscount, guessfactor, ntasks, seconds, and void().
Referenced by main().
void USAGE | ( | const char * | me | ) |
Definition at line 181 of file crypto-keygen-standalone.c.
Referenced by main().
unsigned int generated |
Definition at line 207 of file crypto-keygen-standalone.c.
Referenced by fastreject(), main(), and print_generated().
double generated_offset |
Definition at line 209 of file crypto-keygen-standalone.c.
Referenced by main(), and print_generated().
double guesscount |
Definition at line 210 of file crypto-keygen-standalone.c.
Referenced by main(), and print_generated().
double guessfactor |
Definition at line 211 of file crypto-keygen-standalone.c.
Referenced by main(), and print_generated().
int ignorecase |
Definition at line 241 of file crypto-keygen-standalone.c.
Referenced by fastreject(), and main().
const char * infix = NULL |
Definition at line 239 of file crypto-keygen-standalone.c.
Referenced by fastreject(), and main().
unsigned int ntasks = 1 |
Definition at line 208 of file crypto-keygen-standalone.c.
Referenced by main(), and print_generated().
const char* prefix = NULL |
Definition at line 239 of file crypto-keygen-standalone.c.
Referenced by Con_DrawInput(), fastreject(), and main().
size_t prefixlen = 0 |
Definition at line 240 of file crypto-keygen-standalone.c.
Referenced by fastreject(), and main().
unsigned int seconds |
Definition at line 206 of file crypto-keygen-standalone.c.
Referenced by main(), print_generated(), Sbar_Score(), Sbar_SoloScoreboard(), and SV_Status_f().
mode_t umask_save |
Definition at line 160 of file crypto-keygen-standalone.c.
Referenced by lumps2file(), and main().