enigma

A library for simulating the Enigma machines.

Members

Aliases

EnigmaA28
alias EnigmaA28 = Enigma!(3, EnigmaType.gearDrive | EnigmaType.movableReflector)

Enigma A28, which has three rotor slots and no plugboard. The reflector can be set to any positions. In addition, the rotors and the reflector rotates normally (not "double stepping").

EnigmaD
alias EnigmaD = Enigma!(3, EnigmaType.settableReflectorPos)

Enigma D, which has three rotor slots and no plugboard. The reflector can be set to any positions.

EnigmaG
alias EnigmaG = EnigmaA28

Enigma G, which has three rotor slots and no plugboard. The reflector can be set to any positions. In addition, the rotors and the reflector rotates normally (not "double stepping").

EnigmaI
alias EnigmaI = Enigma!(3, EnigmaType.plugboard)

Enigma I 'Wehrmacht', which has three rotor slots.

EnigmaKD
alias EnigmaKD = EnigmaD

Enigma KD, which has three rotor slots and no plugboard. The reflector can be set to any positions.

EnigmaM3
alias EnigmaM3 = EnigmaI

Enigma M3, which has three rotor slots.

EnigmaM4
alias EnigmaM4 = Enigma!(4, EnigmaType.fixedFinalRotor | EnigmaType.plugboard)

Enigma M4, which has four rotor slots. The fourth rotor never rotates.

EnigmaR
alias EnigmaR = EnigmaD

Enigma R, which has three rotor slots and no plugboard. The reflector can be set to any positions.

EnigmaT
alias EnigmaT = EnigmaD

Enigma T 'Tirpitz', which has three rotor slots and no plugboard. The reflector can be set to any positions.

Norway
alias Norway = EnigmaI

Norway Enigma, which has three rotor slots.

SwissK
alias SwissK = EnigmaD

Swiss K, which has three rotor slots and no plugboard. The reflector can be set to any positions.

reflectorA865
alias reflectorA865 = reflectorD
reflectorG111
alias reflectorG111 = reflectorD
reflectorG260
alias reflectorG260 = reflectorD
reflectorK
alias reflectorK = reflectorD

Predefined existent reflectors.

rotorIVNor
alias rotorIVNor = rotorIV

Predefined existent rotors.

Enums

EnigmaType
enum EnigmaType

Functions

entryWheel
auto entryWheel(S backwardSubstitution)

A convenience function to make an entry wheel from a substitution.

entryWheelABC
auto entryWheelABC()

Predefined the simplest entry wheel which does not substitute.

entryWheelKZR
auto entryWheelKZR()

Predefined entry wheel: KZR... -> ABC...

entryWheelQWE
auto entryWheelQWE()

Predefined entry wheel: QWE... -> ABC...

plugboard
auto plugboard(S substitution)

A convenience function to make a plugboard from a substitution.

plugboardDoNothing
auto plugboardDoNothing()

Predefined the simplest plugboard which does not substitute.

reflector
auto reflector(S substitution, dchar ringSetting)

A convenience function to make a reflector from a substitution.

reflectorA
auto reflectorA()

Predefined existent reflectors.

reflectorB
auto reflectorB()
Undocumented in source. Be warned that the author may not have intended to support it.
reflectorBThin
auto reflectorBThin()
reflectorC
auto reflectorC()
reflectorCThin
auto reflectorCThin()
reflectorD
auto reflectorD(dchar ringSetting)
reflectorFRA
auto reflectorFRA(dchar ringSetting)
reflectorG312
auto reflectorG312(dchar ringSetting)
reflectorNor
auto reflectorNor()
reflectorR
auto reflectorR(dchar ringSetting)
reflectorT
auto reflectorT(dchar ringSetting)

Predefined existent reflectors.

rotor
auto rotor(S forwardSubstitution, C turnovers, dchar ringSetting)

A convenience function to make a rotor from a forward substitution. If turnovers are not specified, the rotor has no turnover notches, otherwise, for example, if turnovers are 'B' and 'Z', the next rotor steps when this rotor steps from B to C and from Z to A. If ringSetting is 'C', it corresponds to "C-03".

rotorBeta
auto rotorBeta(dchar ringSetting)
rotorGamma
auto rotorGamma(dchar ringSetting)

Predefined existent rotors. Because these rotors have no turnover notches, they are generally set side by side with a reflector.

rotorI
auto rotorI(dchar ringSetting)
rotorIA865
auto rotorIA865(dchar ringSetting)
rotorID
auto rotorID(dchar ringSetting)
rotorIG111
auto rotorIG111(dchar ringSetting)
rotorIG260
auto rotorIG260(dchar ringSetting)
rotorIG312
auto rotorIG312(dchar ringSetting)
rotorII
auto rotorII(dchar ringSetting)
rotorIIA865
auto rotorIIA865(dchar ringSetting)
rotorIID
auto rotorIID(dchar ringSetting)
rotorIIG111
auto rotorIIG111(dchar ringSetting)
rotorIIG260
auto rotorIIG260(dchar ringSetting)
rotorIIG312
auto rotorIIG312(dchar ringSetting)
rotorIII
auto rotorIII(dchar ringSetting)
rotorIIIA865
auto rotorIIIA865(dchar ringSetting)
rotorIIID
auto rotorIIID(dchar ringSetting)
rotorIIIG260
auto rotorIIIG260(dchar ringSetting)
rotorIIIG312
auto rotorIIIG312(dchar ringSetting)
rotorIIIK
auto rotorIIIK(dchar ringSetting)
rotorIIIKD
auto rotorIIIKD(dchar ringSetting)
rotorIIINor
auto rotorIIINor(dchar ringSetting)
rotorIIIR
auto rotorIIIR(dchar ringSetting)
rotorIIIT
auto rotorIIIT(dchar ringSetting)
rotorIIK
auto rotorIIK(dchar ringSetting)
rotorIIKD
auto rotorIIKD(dchar ringSetting)
rotorIINor
auto rotorIINor(dchar ringSetting)
rotorIIR
auto rotorIIR(dchar ringSetting)
rotorIIT
auto rotorIIT(dchar ringSetting)
rotorIK
auto rotorIK(dchar ringSetting)
rotorIKD
auto rotorIKD(dchar ringSetting)
rotorINor
auto rotorINor(dchar ringSetting)
rotorIR
auto rotorIR(dchar ringSetting)
rotorIT
auto rotorIT(dchar ringSetting)
rotorIV
auto rotorIV(dchar ringSetting)
rotorIVT
auto rotorIVT(dchar ringSetting)
rotorV
auto rotorV(dchar ringSetting)
rotorVG111
auto rotorVG111(dchar ringSetting)
rotorVI
auto rotorVI(dchar ringSetting)
rotorVII
auto rotorVII(dchar ringSetting)
rotorVIII
auto rotorVIII(dchar ringSetting)
rotorVIIIT
auto rotorVIIIT(dchar ringSetting)
rotorVIIT
auto rotorVIIT(dchar ringSetting)
rotorVIT
auto rotorVIT(dchar ringSetting)
rotorVNor
auto rotorVNor(dchar ringSetting)
rotorVT
auto rotorVT(dchar ringSetting)

Predefined existent rotors.

Structs

Enigma
struct Enigma(size_t rotorN, EnigmaType enigmaType = EnigmaType.none)
EntryWheel
struct EntryWheel
Plugboard
struct Plugboard
Reflector
struct Reflector
Rotor
struct Rotor

Meta

Authors

Kazuya Takahashi