-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0bd56b3
commit 25d50d3
Showing
22 changed files
with
106 additions
and
55 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
[metadata] | ||
name = enigma | ||
name = myenigma | ||
version = 1.0.0 | ||
author = DingJunyao | ||
author_email = [email protected] | ||
description = Python-based Enigma. | ||
long_description = file: README.md | ||
long_description_content_type = text/markdown | ||
url = https://github.com/DingJunyao/enigma | ||
url = https://github.com/DingJunyao/myenigma | ||
project_urls = | ||
Source = https://github.com/DingJunyao/enigma | ||
Bug Tracker = https://github.com/DingJunyao/enigma/issues | ||
Source = https://github.com/DingJunyao/myenigma | ||
Bug Tracker = https://github.com/DingJunyao/myenigma/issues | ||
classifiers = | ||
Programming Language :: Python :: 3 | ||
License :: OSI Approved :: MIT License | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from ..part.plate import Reflector | ||
|
||
|
||
def reflector_b(): | ||
return Reflector('YRUHQSLDPXNGOKMIEBFZCWVJAT', name='Reflector B') | ||
|
||
|
||
def reflector_c(): | ||
return Reflector('FVPJIAOYEDRZXWGCTKUQSBNMHL', name='Reflector C') | ||
|
||
|
||
def reflector_b_thin(): | ||
return Reflector('ENKQAUYWJICOPBLMDXZVFTHRGS', name='Reflector B Thin') | ||
|
||
|
||
def reflector_c_thin(): | ||
return Reflector('RDOBJNTKVEHMLFCWZAXGYIPSUQ', name='Reflector C Thin') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
from ..part.plate import Rotor | ||
|
||
|
||
def rotor_i(): | ||
return Rotor('EKMFLGDQVZNTOWYHXUSPAIBRCJ', name='Rotor I', turnover='Q') | ||
|
||
|
||
def rotor_ii(): | ||
return Rotor('AJDKSIRUXBLHWTMCQGZNPYFVOE', name='Rotor II', turnover='E') | ||
|
||
|
||
def rotor_iii(): | ||
return Rotor('BDFHJLCPRTXVZNYEIWGAKMUSQO', name='Rotor III', turnover='V') | ||
|
||
|
||
def rotor_iv(): | ||
return Rotor('ESOVPZJAYQUIRHXLNFTGKDCMWB', name='Rotor IV', turnover='J') | ||
|
||
|
||
def rotor_v(): | ||
return Rotor('VZBRGITYUPSDNHLXAWMJQOFECK', name='Rotor V', turnover='Z') | ||
|
||
|
||
def rotor_vi(): | ||
return Rotor('JPGVOUMFYQBENHZRDKASXLICTW', name='Rotor VI', turnover=['Z', 'M']) | ||
|
||
|
||
def rotor_vii(): | ||
return Rotor('NZJHGRCXMYSWBOUFAIVLPEKQDT', name='Rotor VII', turnover=['Z', 'M']) | ||
|
||
|
||
def rotor_viii(): | ||
return Rotor('FKQHTLXOCBJSPDZRAMEWNIUYGV', name='Rotor VIII', turnover=['Z', 'M']) | ||
|
||
|
||
def rotor_beta(): | ||
return Rotor('LEYJVCNIXWPBQMDRTAKZGFUHOS', name='Rotor Beta') | ||
|
||
|
||
def rotor_gamma(): | ||
return Rotor('FSOKANUERHMBTIYCWLQPZXVGJD', name='Rotor Gamma') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
from src.enigma.part.plate.plate import Plate | ||
from src.myenigma.part.plate.plate import Plate | ||
|
||
|
||
def test_000_plate(): | ||
r = Plate('EKMFLGDQVZNTOWYHXUSPAIBRCJ') | ||
r.encrypt('A', 'right') | ||
r.encrypt('A', 'right') |