enigma ~master

A library for simulating the Enigma machines.


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

enigma - Enigma machine simulation library

enigma is a library for simulating the Enigma machines written in the D programming language.

This library is aims to reproduce the existent variations of machines and mechanisms, and be also able to create user-defined models. Moreover, it is intended to be implemented internally using the mathematical representation of the components, such as groups and matrices.

Note that of course such replicas are extremely vulnerable for actual ciphering use!

Example

This simple program using enigma imitates the existent "M3" model. It will get user input and write the ciphered text to stdout.

void main()
{
    import std.stdio;
    import enigma;

    auto m3 = EnigmaM3(entryWheelABC, rotorIII, rotorII, rotorI, reflectorB, "AAA");
    foreach (c; readln!dstring)
    {
        write(m3(c));
    }
}

Most of the known models and their components are predefined as seen above. For more information, read the documents generated with dub --build=docs.

About Enigma

Authors:
  • Kazuya Takahashi
Dependencies:
none
Versions:
0.3.2 2021-Mar-01
0.3.1 2016-Oct-08
0.3.0 2016-Mar-13
0.2.0 2016-Mar-07
0.1.2 2016-Mar-04
Show all 8 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 79 downloads total

Score:
0.6
Short URL:
enigma.dub.pm