| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
#ifndef NTSEVEN_H |
| 33 |
#define NTSEVEN_H |
| 34 |
|
| 35 |
#include <stdint.h> |
| 36 |
|
| 37 |
#include "misc.h" |
| 38 |
#include "table.h" |
| 39 |
|
| 40 |
#ifdef __cplusplus |
| 41 |
extern "C" { |
| 42 |
#endif |
| 43 |
|
| 44 |
static const uchar_t ntseven_ext95[95]="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ !\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"; |
| 45 |
static const uint32_t power2_95 = 9025; |
| 46 |
|
| 47 |
static const uint64_t ntseven_sizes[10] = { 4, 33554432, 3238653500, 6477307000LLU, 3238706894, 6477413788LLU, 3238728908, 6477457816LLU, 3238618308, 6477236616LLU}; |
| 48 |
|
| 49 |
int ntseven_setup(void *tbl_); |
| 50 |
void ntseven_find(void *hsh_, void *tbl_, void *el_); |
| 51 |
int ntseven_lookup_srt(void *hsh_, void *tbl_, void *el_); |
| 52 |
int ntseven_check(void *hsh_, void *tbl_, void *el_); |
| 53 |
int ntseven_isvalid(void *hsh_, void *tbl_); |
| 54 |
|
| 55 |
void ntseven_mkredux(table_t *tbl, uchar_t *hash, uchar_t *pwd, int n_redux); |
| 56 |
void ntseven_mkhash(uchar_t *pwd, uchar_t *hash); |
| 57 |
|
| 58 |
uint64_t ntseven_bin95(uchar_t *input, int length); |
| 59 |
int ntseven_unbin95(uint32_t input, uchar_t *output, int length); |
| 60 |
|
| 61 |
#ifdef __cplusplus |
| 62 |
} |
| 63 |
#endif |
| 64 |
#endif |