Move benchmark related stuff to benchmark.c

This commit is contained in:
jsteube
2016-09-12 10:16:42 +02:00
parent 10b4670682
commit e25224a940
8 changed files with 619 additions and 637 deletions
+4
View File
@@ -6,4 +6,8 @@
#ifndef _BENCHMARK_H
#define _BENCHMARK_H
#define BENCHMARK 0
#define DEFAULT_BENCHMARK_ALGORITHMS_CNT 146
#endif // _BENCHMARK_H
+13 -4
View File
@@ -12,9 +12,13 @@
#include <errno.h>
#include <limits.h>
#define HASH_MODE 0
#define HEX_SALT 0
#define SEPARATOR ':'
#define PW_MIN 0
#define PW_MAX 54
#define PW_MAX1 (PW_MAX + 1)
#define HASH_MODE 0
#define HEX_SALT 0
#define SEPARATOR ':'
/**
* weak hashes shutcut
@@ -1661,6 +1665,11 @@ void to_hccap_t (hccap_t *hccap, uint salt_pos, uint digest_pos, hashconfig_t *h
void ascii_digest (char *out_buf, uint salt_pos, uint digest_pos, hashconfig_t *hashconfig, void *digests_buf, salt_t *salts_buf, void *esalts_buf, hashinfo_t **hash_info, char *hashfile);
int hashconfig_init (hashconfig_t *hashconfig, const uint hash_mode, const char separator, const uint hex_salt);
int hashconfig_init (hashconfig_t *hashconfig, const uint hash_mode, const char separator, const uint hex_salt);
void hashconfig_destroy (hashconfig_t *hashconfig);
uint hashconfig_general_pw_min (hashconfig_t *hashconfig);
uint hashconfig_general_pw_max (hashconfig_t *hashconfig);
void hashconfig_benchmark_defaults (hashconfig_t *hashconfig, salt_t *salt, void *esalt);
char *hashconfig_benchmark_mask (hashconfig_t *hashconfig);
#endif // _INTERFACE_H
+1
View File
@@ -45,6 +45,7 @@ typedef struct
void mp_css_to_uniq_tbl (uint css_cnt, cs_t *css, uint uniq_tbls[SP_PW_MAX][CHARSIZ]);
void mp_cut_at (char *mask, uint max);
uint mp_get_length (char *mask);
void mp_exec (u64 val, char *buf, cs_t *css, int css_cnt);
cs_t *mp_gen_css (char *mask_buf, size_t mask_len, cs_t *mp_sys, cs_t *mp_usr, uint *css_cnt, hashconfig_t *hashconfig);
u64 mp_get_sum (uint css_cnt, cs_t *css);
-3
View File
@@ -215,9 +215,6 @@ typedef struct
} wordr_t;
#define RULES_MAX 256
#define PW_MIN 0
#define PW_MAX 54
#define PW_MAX1 (PW_MAX + 1)
#define PW_DICTMAX 31
#define PW_DICTMAX1 (PW_DICTMAX + 1)