libenigma
Enigma machine utility library
Loading...
Searching...
No Matches
common.h File Reference

Go to the source code of this file.

Macros

#define ENIGMA_STATIC   static
 
#define ENIGMA_ALPHA_SIZE   26
 Defines the size of the alphabet used in the Enigma machine.
 
#define ENIGMA_MAX_ROTOR_COUNT   4
 Defines the maximum number of rotors that can be used in the Enigma machine.
 
#define ENIGMA_SUCCESS   0
 Function executed successfully.
 
#define ENIGMA_FAILURE   -1
 Function encountered an error.
 
#define ENIGMA_MAX_PLUGBOARD_SETTINGS   10
 Defines the maximum number of plugboard settings that can be used in the Enigma machine.
 
#define ENIGMA_DEFAULT_NGRAM_COUNT   (26 * 26 * 26 * 26)
 Defines the default number of n-grams used for analysis.
 
#define ENIGMA_LANG_ENGLISH   0
 Defines the language code for English.
 
#define ENIGMA_LANG_GERMAN   1
 Defines the language code for German.
 
#define ENIGMA_VERSION   "unknown"
 Defines the version of libenigma.
 
#define ENIGMA_ALWAYS_INLINE   inline
 
#define EMSCRIPTEN_KEEPALIVE
 

Detailed Description

This file contains common definitions, macros, and constants used throughout libenigma.

Macro Definition Documentation

◆ EMSCRIPTEN_KEEPALIVE

#define EMSCRIPTEN_KEEPALIVE

◆ ENIGMA_ALPHA_SIZE

#define ENIGMA_ALPHA_SIZE   26

Defines the size of the alphabet used in the Enigma machine.

◆ ENIGMA_ALWAYS_INLINE

#define ENIGMA_ALWAYS_INLINE   inline

◆ ENIGMA_DEFAULT_NGRAM_COUNT

#define ENIGMA_DEFAULT_NGRAM_COUNT   (26 * 26 * 26 * 26)

Defines the default number of n-grams used for analysis.

26^4 = 456976, the total number of possible 4-letter combinations.

◆ ENIGMA_FAILURE

#define ENIGMA_FAILURE   -1

Function encountered an error.

◆ ENIGMA_LANG_ENGLISH

#define ENIGMA_LANG_ENGLISH   0

Defines the language code for English.

◆ ENIGMA_LANG_GERMAN

#define ENIGMA_LANG_GERMAN   1

Defines the language code for German.

◆ ENIGMA_MAX_PLUGBOARD_SETTINGS

#define ENIGMA_MAX_PLUGBOARD_SETTINGS   10

Defines the maximum number of plugboard settings that can be used in the Enigma machine.

◆ ENIGMA_MAX_ROTOR_COUNT

#define ENIGMA_MAX_ROTOR_COUNT   4

Defines the maximum number of rotors that can be used in the Enigma machine.

◆ ENIGMA_STATIC

#define ENIGMA_STATIC   static

◆ ENIGMA_SUCCESS

#define ENIGMA_SUCCESS   0

Function executed successfully.

◆ ENIGMA_VERSION

#define ENIGMA_VERSION   "unknown"

Defines the version of libenigma.