From c9dd9469183d95c6c2f4d01e3d6365ec57386a65 Mon Sep 17 00:00:00 2001 From: Leonard Kugis Date: Mon, 25 Apr 2022 18:43:46 +0200 Subject: Initial commit --- src/algorithmus/XOR.java | 102 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100755 src/algorithmus/XOR.java (limited to 'src/algorithmus/XOR.java') diff --git a/src/algorithmus/XOR.java b/src/algorithmus/XOR.java new file mode 100755 index 0000000..0bbfef3 --- /dev/null +++ b/src/algorithmus/XOR.java @@ -0,0 +1,102 @@ +package algorithmus; + +import java.awt.TextField; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +import javax.swing.JButton; +import javax.swing.JFrame; +import javax.swing.JLabel; +import javax.swing.JSpinner; + +public class XOR extends Algorithmus { + + private String name, key; + private String[] folgen; + private char[] chars; + + public XOR() { + name = "XOR"; + key = ""; + chars = new char[] { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' }; + folgen = new String[] { "01000001", "01000010", "01000011", "01000100", "01000101", "01000110", "01000111", "01001000", "01001001", "01001010", "01001011", "01001100", "01001101", "01001110", "01001111", "01010000", "01010001", "01010011", "01010100", "01010101", "01010110", "01010111", "01011000", "01011001", "01011010" }; + } + + @Override + public void options() { + JFrame frame = new JFrame(); + frame.setLayout(null); + frame.setTitle("XOR"); + frame.setSize(200, 150); + TextField keyField = new TextField(); + keyField.setText(key); + keyField.setBounds(5, 5, 150, 20); + TextField alphabet = new TextField(); + String alphaText = ""; + for(int i = 0; i