|
libenigma
Enigma machine utility library
|
#include "enigma.h"Go to the source code of this file.
Data Structures | |
| struct | EnigmaScore |
| A structure representing a scored Enigma configuration. More... | |
| struct | EnigmaScoreList |
| A structure representing a list of scored Enigma configurations. More... | |
Macros | |
| #define | ENIGMA_FLAG_DICTIONARY_MATCH 1 |
| Flag indicating that an analyzed configuration should, or does, have at least two dictionary word matches. | |
| #define | ENIGMA_FLAG_FREQUENCY 2 |
| Flag indicating that an analyzed configuration should, or does, fall within a certain letter frequency range. | |
| #define | ENIGMA_FLAG_KNOWN_PLAINTEXT 4 |
| Flag indicating that an analyzed configuration should, or does, contain known plaintext. | |
This file contains function definitions related to plaintext scoring.
| #define ENIGMA_FLAG_DICTIONARY_MATCH 1 |
Flag indicating that an analyzed configuration should, or does, have at least two dictionary word matches.
| #define ENIGMA_FLAG_FREQUENCY 2 |
Flag indicating that an analyzed configuration should, or does, fall within a certain letter frequency range.
| #define ENIGMA_FLAG_KNOWN_PLAINTEXT 4 |
Flag indicating that an analyzed configuration should, or does, contain known plaintext.
| Enigma * enigma_score_get_enigma | ( | EnigmaScore * | score | ) |
Get the enigma field in the given EnigmaScore.
| score | The EnigmaScore instance |
| int enigma_score_get_flags | ( | EnigmaScore * | score | ) |
Get the flags field in the given EnigmaScore.
| score | The EnigmaScore instance |
| float enigma_score_get_score | ( | EnigmaScore * | score | ) |
Get the score field in the given EnigmaScore.
| score | The EnigmaScore instance |
| int enigma_score_list_get_max_scores | ( | EnigmaScoreList * | list | ) |
Get the maximum number of scores from the given EnigmaScoreList.
| list | The EnigmaScoreList instance |
| EnigmaScore * enigma_score_list_get_score | ( | EnigmaScoreList * | list, |
| int | index | ||
| ) |
Get the score at the given index from the given EnigmaScoreList.
| list | The EnigmaScoreList instance |
| index | The index of the score to get |
| int enigma_score_list_get_score_count | ( | EnigmaScoreList * | list | ) |
Get the score count from the given EnigmaScoreList.
| list | The EnigmaScoreList instance |
| EnigmaScore * enigma_score_list_get_scores | ( | EnigmaScoreList * | list | ) |
Get the scores array from the given EnigmaScoreList.
| list | The EnigmaScoreList instance |
| int enigma_score_list_set_max_scores | ( | EnigmaScoreList * | list, |
| int | max | ||
| ) |
Set the maximum number of scores in the given EnigmaScoreList.
| list | The EnigmaScoreList instance |
| max | The new maximum number of scores |
| int enigma_score_list_set_score | ( | EnigmaScoreList * | list, |
| int | index, | ||
| EnigmaScore * | score | ||
| ) |
Set the score at the given index in the given EnigmaScoreList.
| list | The EnigmaScoreList instance |
| index | The index of the score to set |
| score | The EnigmaScore instance to set |
| int enigma_score_list_set_score_count | ( | EnigmaScoreList * | list, |
| int | count | ||
| ) |
Set the score count in the given EnigmaScoreList.
| list | The EnigmaScoreList instance |
| count | The new score count |
| int enigma_score_list_sort | ( | EnigmaScoreList * | list | ) |
Sort an array of EnigmaScore by score in descending order.
| list | The array of EnigmaScore to sort. |
| int enigma_score_print | ( | const EnigmaScoreList * | list | ) |
Print the scores in an EnigmaScoreList.
| list | Pointer to the EnigmaScoreList structure. |
| int enigma_score_set_enigma | ( | EnigmaScore * | score, |
| Enigma * | enigma | ||
| ) |
Set the enigma field in the given EnigmaScore.
| score | The EnigmaScore instance |
| enigma | The Enigma instance to set |
| int enigma_score_set_flags | ( | EnigmaScore * | score, |
| int | flags | ||
| ) |
Set the flags field in the given EnigmaScore.
| score | The EnigmaScore instance |
| flags | The flags value to set |
| int enigma_score_set_score | ( | EnigmaScore * | score, |
| float | value | ||
| ) |
Set the score field in the given EnigmaScore.
| score | The EnigmaScore instance |
| value | The score value to set |