enigma

A library for simulating the Enigma machines.

Members

Aliases

EnigmaD
alias EnigmaD = Enigma!(3, false, false, true)

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

EnigmaI
alias EnigmaI = Enigma!3

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

EnigmaM3
alias EnigmaM3 = EnigmaI

Enigma M3, which has three rotor slots.

EnigmaM4
alias EnigmaM4 = Enigma!(4, true)

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.

reflectorK
alias reflectorK = reflectorD

Predefined existent reflectors.

rotorIVNor
alias rotorIVNor = rotorIV

Predefined existent rotors.

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)
reflectorNor
auto reflectorNor()
reflectorR
auto reflectorR(dchar ringSetting)
reflectorT
auto reflectorT(dchar ringSetting)

Predefined existent reflectors.

rotor
auto rotor(S forwardSubstitution, dchar ringSetting)

A convenience function to make a rotor with no turnover notches from a forward substitution. If ringSetting is 'C', it corresponds to "C-03".

rotor
auto rotor(S forwardSubstitution, dchar turnover, dchar ringSetting)

A convenience function to make a rotor with one turnover notch from a forward substitution. If turnover is 'B', the next rotor steps when this rotor steps from B to C. If ringSetting is 'C', it corresponds to "C-03".

rotor
auto rotor(S forwardSubstitution, dchar turnover1, dchar turnover2, dchar ringSetting)

A convenience function to make a rotor with two turnover notches from a forward substitution. If turnover1 is 'B' and turnover2 is '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".

rotor
auto rotor(S forwardSubstitution, dchar turnover1, dchar turnover2, dchar turnover3, dchar turnover4, dchar turnover5, dchar ringSetting)

A convenience function to make a rotor with five turnover notches from a forward substitution. If turnover1 is 'B' and turnover2 is '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)
rotorID
auto rotorID(dchar ringSetting)
rotorII
auto rotorII(dchar ringSetting)
rotorIID
auto rotorIID(dchar ringSetting)
rotorIII
auto rotorIII(dchar ringSetting)
rotorIIID
auto rotorIIID(dchar ringSetting)
rotorIIIK
auto rotorIIIK(dchar ringSetting)
rotorIIINor
auto rotorIIINor(dchar ringSetting)
rotorIIIR
auto rotorIIIR(dchar ringSetting)

Predefined existent rotors.

rotorIIIT
auto rotorIIIT(dchar ringSetting)
Undocumented in source. Be warned that the author may not have intended to support it.
rotorIIK
auto rotorIIK(dchar ringSetting)
rotorIINor
auto rotorIINor(dchar ringSetting)
rotorIIR
auto rotorIIR(dchar ringSetting)

Predefined existent rotors.

rotorIIT
auto rotorIIT(dchar ringSetting)
Undocumented in source. Be warned that the author may not have intended to support it.
rotorIK
auto rotorIK(dchar ringSetting)
rotorINor
auto rotorINor(dchar ringSetting)
rotorIR
auto rotorIR(dchar ringSetting)
rotorIT
auto rotorIT(dchar ringSetting)
rotorIV
auto rotorIV(dchar ringSetting)

Predefined existent rotors.

rotorIVT
auto rotorIVT(dchar ringSetting)
Undocumented in source. Be warned that the author may not have intended to support it.
rotorV
auto rotorV(dchar ringSetting)
rotorVI
auto rotorVI(dchar ringSetting)
rotorVII
auto rotorVII(dchar ringSetting)
rotorVIII
auto rotorVIII(dchar ringSetting)

Predefined existent rotors.

rotorVIIIT
auto rotorVIIIT(dchar ringSetting)
Undocumented in source. Be warned that the author may not have intended to support it.
rotorVIIT
auto rotorVIIT(dchar ringSetting)
Undocumented in source. Be warned that the author may not have intended to support it.
rotorVIT
auto rotorVIT(dchar ringSetting)
Undocumented in source. Be warned that the author may not have intended to support it.
rotorVNor
auto rotorVNor(dchar ringSetting)

Predefined existent rotors.

rotorVT
auto rotorVT(dchar ringSetting)
Undocumented in source. Be warned that the author may not have intended to support it.

Structs

Enigma
struct Enigma(size_t rotorN, bool fixedFinalRotor = false, bool hasPlugboard = true, bool settableReflectorPos = false)

Currently machines with the double-stepping mechanism are available.

EntryWheel
struct EntryWheel
Plugboard
struct Plugboard
Reflector
struct Reflector
Rotor
struct Rotor

Meta

Authors

Kazuya Takahashi