1
mirror of https://github.com/hashcat/hashcat synced 2025-03-19 06:14:22 +01:00

62 lines
1.2 KiB
C
Raw Normal View History

2015-12-04 15:47:52 +01:00
/**
* Authors.....: Jens Steube <jens.steube@gmail.com>
* magnum <john.magnum@hushmail.com>
*
2015-12-04 15:47:52 +01:00
* License.....: MIT
*/
#ifndef _COMMON_H
#define _COMMON_H
2015-12-04 15:47:52 +01:00
#if defined (__linux__)
#define _POSIX
#elif defined (__APPLE__)
#define _POSIX
#elif defined (__FreeBSD__)
#define _POSIX
#elif defined (_WIN32) || defined (_WIN64)
#define _WIN
#else
#error Your Operating System is not supported or detected
#endif
2015-12-04 15:47:52 +01:00
#define _GNU_SOURCE
#define _FILE_OFFSET_BITS 64
#define EXEC_CACHE 128
#define SPEED_CACHE 128
#define SPEED_MAXAGE 4096
2015-12-04 15:47:52 +01:00
#define HCBUFSIZ 0x50000 // general large space buffer size in case the size is unknown at compile-time
2015-12-04 15:47:52 +01:00
2016-09-06 15:28:56 +02:00
#define BLOCK_SIZE 64
2016-06-14 10:18:42 +02:00
#define EXPECTED_ITERATIONS 10000
2016-01-15 17:16:43 +01:00
#define MIN(a,b) (((a) < (b)) ? (a) : (b))
#define MAX(a,b) (((a) > (b)) ? (a) : (b))
#define DEVICES_MAX 128
#define PARAMCNT 64
2016-05-01 18:34:59 +02:00
#define CEIL(a) ((a - (int) (a)) > 0 ? a + 1 : a)
#if defined (__APPLE__)
#define __stdcall
#endif
#if defined (_WIN32) || defined (__WIN32__) || defined (__CYGWIN__)
#define HC_API_CALL __stdcall
#else
#define HC_API_CALL
#endif
#if defined (_WIN)
#define WIN32_LEAN_AND_MEAN
#endif
#endif // _COMMON_H