From 53cc413eaee00d1de585abfafbdc5cec5ae2413c Mon Sep 17 00:00:00 2001 From: s2224834 <46319860+s2224834@users.noreply.github.com> Date: Thu, 3 Jan 2019 18:48:50 +0000 Subject: [PATCH] Typex: move machine implementation to lib/ --- src/core/lib/Typex.mjs | 183 ++++++++++++++++++++++++++++++++ src/core/operations/Typex.mjs | 193 ++-------------------------------- 2 files changed, 193 insertions(+), 183 deletions(-) create mode 100644 src/core/lib/Typex.mjs diff --git a/src/core/lib/Typex.mjs b/src/core/lib/Typex.mjs new file mode 100644 index 00000000..a99f3b6e --- /dev/null +++ b/src/core/lib/Typex.mjs @@ -0,0 +1,183 @@ +/** + * Emulation of the Typex machine. + * + * @author s2224834 + * @copyright Crown Copyright 2019 + * @license Apache-2.0 + */ +import OperationError from "../errors/OperationError"; +import * as Enigma from "../lib/Enigma"; +import Utils from "../Utils"; + +export const ROTORS = [ + {name: "1", value: "QWECYJIBFKMLTVZPOHUDGNRSXA