diff --git a/src/core/config/Categories.json b/src/core/config/Categories.json index 3e0d108e..f3b73921 100755 --- a/src/core/config/Categories.json +++ b/src/core/config/Categories.json @@ -103,7 +103,8 @@ "Citrix CTX1 Encode", "Citrix CTX1 Decode", "Pseudo-Random Number Generator", - "Enigma" + "Enigma", + "Typex" ] }, { diff --git a/src/core/operations/Typex.mjs b/src/core/operations/Typex.mjs new file mode 100644 index 00000000..89114863 --- /dev/null +++ b/src/core/operations/Typex.mjs @@ -0,0 +1,396 @@ +/** + * Emulation of the Typex machine. + * + * @author s2224834 + * @copyright Crown Copyright 2019 + * @license Apache-2.0 + */ + +import Operation from "../Operation"; +import OperationError from "../errors/OperationError"; +import Utils from "../Utils"; +import * as Enigma from "../lib/Enigma"; + +const ROTORS = [ + {name: "1", value: "QWECYJIBFKMLTVZPOHUDGNRSXA