1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-12-30 18:31:00 +00:00
hashcat/include/shared.h

35 lines
838 B
C
Raw Normal View History

2015-12-04 14:47:52 +00:00
/**
* Author......: See docs/credits.txt
2015-12-04 14:47:52 +00:00
* License.....: MIT
*/
#ifndef _SHARED_H
#define _SHARED_H
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
2016-09-28 21:53:46 +00:00
#include <time.h>
2016-09-28 22:25:36 +00:00
#include <fcntl.h>
2015-12-04 14:47:52 +00:00
2016-09-20 15:04:31 +00:00
bool is_power_of_2 (const u32 v);
2016-09-08 08:01:49 +00:00
u32 get_random_num (const u32 min, const u32 max);
2015-12-04 14:47:52 +00:00
2016-09-08 08:01:49 +00:00
u32 mydivc32 (const u32 dividend, const u32 divisor);
u64 mydivc64 (const u64 dividend, const u64 divisor);
char *filename_from_filepath (char *filepath);
2016-09-30 15:41:40 +00:00
void naive_replace (char *s, const char key_char, const char replace_char);
void naive_escape (char *s, size_t s_max, const char key_char, const char escape_char);
2015-12-04 14:47:52 +00:00
void hc_sleep_msec (const u32 msec);
void hc_sleep (const u32 sec);
2016-09-08 08:48:38 +00:00
2016-09-28 21:53:46 +00:00
void setup_environment_variables ();
void setup_umask ();
void setup_seeding (const bool rp_gen_seed_chgd, const u32 rp_gen_seed);
#endif // _SHARED_H