libenigma
Enigma machine utility library
Loading...
Searching...
No Matches
brute.c File Reference
#include "brute.h"
#include "common.h"

Functions

float enigma_brute_score (const EnigmaCrackParams *cfg, const char *text)
 Calculate the score of a given text using the brute force dictionary cracking method.
 

Detailed Description

This file implements scoring functions for brute force dictionary cracking of Enigma machines that were hopefully already partially cracked.

This file defines definitions for scoring functions for brute force dictionary cracking of Enigma machines that were hopefully already partially cracked.

Function Documentation

◆ enigma_brute_score()

float enigma_brute_score ( const EnigmaCrackParams cfg,
const char *  text 
)

Calculate the score of a given text using the brute force dictionary cracking method.

Parameters
cfgThe configuration parameters for the Enigma machine.
textThe text to be scored.
Returns
The score of the text. It will be 1.0 if two dictionary words exist in the plaintext, and 0.0 otherwise.