~cedric/pyenigma

6d835c113c40ed7abdd79250515b3643a79e3dcf — Cédric Bonhomme 1 year, 3 months ago 0e39561
updated README and CHANGELOG
2 files changed, 114 insertions(+), 0 deletions(-)

A CHANGELOG.md
A README.md
A CHANGELOG.md => CHANGELOG.md +21 -0
@@ 0,0 1,21 @@
## Release History

### 0.2.2 (2019-12-30)

* pyEnigma is ready for use with poetry.


### 0.2.1 (2018-12-01)

* dependencies upgraded for CVE-2018-18074;
* some useless code removed.


### 0.2 (2018-02-28)

* pyEnigma is ready for use with pipenv and pipsi.


### 0.1 (2017-03-15)

* first release on pypi.

A README.md => README.md +93 -0
@@ 0,0 1,93 @@
# pyEnigma

[![builds.sr.ht status](https://builds.sr.ht/~cedric/pyenigma.svg)](https://builds.sr.ht/~cedric/pyenigma)


[pyEnigma](https://git.sr.ht/~cedric/pyenigma), a  Python Enigma cypher machine
simulator.


## Usage


### As a Python library

```bash
$ poetry install pyenigma
```

```python
Python 3.6.4 (default, Feb 23 2018, 13:45:58)
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from pyenigma import enigma
>>> from pyenigma import rotor
>>> print(rotor.ROTOR_GR_III)

    Name: III
    Model: German Railway (Rocket)
    Date: 7 February 1941
    Wiring: JVIUBHTCDYAKEQZPOSGXNRMWFL
>>>
>>> engine = enigma.Enigma(rotor.ROTOR_Reflector_A, rotor.ROTOR_I,
                                rotor.ROTOR_II, rotor.ROTOR_III, key="ABC",
                                plugs="AV BS CG DL FU HZ IN KM OW RX")
>>> print(engine)

    Reflector:
    Name: Reflector A
    Model: None
    Date: None
    Wiring: EJMZALYXVBWFCRQUONTSPIKHGD

    Rotor 1:
    Name: I
    Model: Enigma 1
    Date: 1930
    Wiring: EKMFLGDQVZNTOWYHXUSPAIBRCJ
    State: A

    Rotor 2:
    Name: II
    Model: Enigma 1
    Date: 1930
    Wiring: AJDKSIRUXBLHWTMCQGZNPYFVOE
    State: B

    Rotor 3:
    Name: III
    Model: Enigma 1
    Date: 1930
    Wiring: BDFHJLCPRTXVZNYEIWGAKMUSQO
    State: C
>>> secret = engine.encipher("Hello World")
>>> print(secret)
Qgqop Vwoxn
```

### As a program

```bash
$ pipx install pyenigma
```


```bash
$ echo "Hello World" | enigma ABC A  I II III "AV BS CG DL FU HZ IN KM OW RX"
Qgqop Vwoxn

$ echo "Qgqop Vwoxn" | enigma ABC A  I II III "AV BS CG DL FU HZ IN KM OW RX"
Hello World
```


## License

pyEnigma is licensed under
[GNU General Public License version 3](https://www.gnu.org/licenses/gpl-3.0.html)


## Author

* [Christophe Goessen](https://github.com/cgoessen) (initial author)
* [Cédric Bonhomme](https://www.cedricbonhomme.org)