https://github.com/vd2org/runigma
RuNigma is a fictional cypher machine inspired by World War 2's Enigma Machines.
https://github.com/vd2org/runigma
crypto python
Last synced: 18 days ago
JSON representation
RuNigma is a fictional cypher machine inspired by World War 2's Enigma Machines.
- Host: GitHub
- URL: https://github.com/vd2org/runigma
- Owner: vd2org
- License: mit
- Created: 2019-02-20T23:42:25.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-01T00:53:14.000Z (over 7 years ago)
- Last Synced: 2025-10-01T07:45:04.518Z (8 months ago)
- Topics: crypto, python
- Language: Python
- Homepage: https://t.me/RuNigmaBot
- Size: 116 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# periodic
RuNigma is a fictional cypher machine inspired by World War 2's Enigma Machines.
# Setup
```bash
pip install runigma
```
# Example usage
```python
from runigma import RuNigmaMachine
rotors = 'Ё Ь Д Н Й'
reflector = 'Ш'
ring_settings = 'a _ y g Б'
plugboard_settings = 'xЕ hЬ КМ Тn iЗ АЛ ЮЫ Бt z8 ОШ wЯ y0 a7 4Ъ СЖ p6 Эe g_ 2b dc'
machine = RuNigmaMachine.from_key_sheet(rotors=rotors, reflector=reflector,
ring_settings=ring_settings,
plugboard_settings=plugboard_settings)
machine.set_display('ЯХ3ОЪ')
crypted = machine.process_text('hello world')
print(crypted)
# displays: БЮУЦwЛgcЭЕМ
```
# Command line tools
## runigma
This tool can be used for encipher and decipher text.
```bash
runigma --key-file=enigma.keys -s ФСИАР -t HELLOXWORLDX
```
```bash
runigma -r A Б В Г Д -i a b c d -p AB CD EF GH IJ KL MN -u Ф -s АУГСД
```
## runigma-sheet
This tool can be used for generate new key sheet file.
```bash
runigma-sheet > keysheet.txt
```