Made static more functions in main file

This commit is contained in:
wiire-a 2017-11-30 11:31:52 +01:00
parent d73b71803a
commit 8de0422164

View File

@ -46,9 +46,9 @@
#include "random/glibc_random.c" #include "random/glibc_random.c"
#include "random/glibc_random_lazy.c" #include "random/glibc_random_lazy.c"
uint32_t ecos_rand_simplest(uint32_t *seed); static uint32_t ecos_rand_simplest(uint32_t *seed);
uint32_t ecos_rand_simple(uint32_t *seed); static uint32_t ecos_rand_simple(uint32_t *seed);
uint32_t ecos_rand_knuth(uint32_t *seed); static uint32_t ecos_rand_knuth(uint32_t *seed);
static int crack_first_half(struct global *wps, char *pin, const uint8_t *es1_override); static int crack_first_half(struct global *wps, char *pin, const uint8_t *es1_override);
static int crack_second_half(struct global *wps, char *pin); static int crack_second_half(struct global *wps, char *pin);
@ -1433,14 +1433,14 @@ usage_err:
} }
/* Simplest */ /* Simplest */
uint32_t ecos_rand_simplest(uint32_t *seed) static uint32_t ecos_rand_simplest(uint32_t *seed)
{ {
*seed = (*seed * 1103515245) + 12345; /* Permutate seed */ *seed = (*seed * 1103515245) + 12345; /* Permutate seed */
return *seed; return *seed;
} }
/* Simple, Linear congruential generator */ /* Simple, Linear congruential generator */
uint32_t ecos_rand_simple(uint32_t *seed) static uint32_t ecos_rand_simple(uint32_t *seed)
{ {
uint32_t s = *seed; uint32_t s = *seed;
uint32_t uret; uint32_t uret;
@ -1457,7 +1457,7 @@ uint32_t ecos_rand_simple(uint32_t *seed)
} }
/* Mersenne-Knuth */ /* Mersenne-Knuth */
uint32_t ecos_rand_knuth(uint32_t *seed) static uint32_t ecos_rand_knuth(uint32_t *seed)
{ {
#define MM 2147483647 /* Mersenne prime */ #define MM 2147483647 /* Mersenne prime */
#define AA 48271 /* This does well in the spectral test */ #define AA 48271 /* This does well in the spectral test */
@ -1472,7 +1472,7 @@ uint32_t ecos_rand_knuth(uint32_t *seed)
} }
/* Simple power function */ /* Simple power function */
int int_pow(int a, int exp) static int int_pow(int a, int exp)
{ {
if (exp <= 0) return 1; if (exp <= 0) return 1;
int r = a; int r = a;