Skip to main content

Posts

Showing posts from August, 2017

Vigenère cipher

After a long time, I've been doing some coding, well I was teaching.I had to do Vigenère cipher in Java. First of all, What is "Vigenère cipher"? The Vigenère cipher is a method of encrypting alphabetic text by using a series of interwoven Caesar ciphers based on the letters of a keyword. It is a form of polyalphabetic substitution ( Wikipedia )  There are a lot of methods for creating this Encryption method. For those who know how to code with OOP Principles, this code may look like Babies Rusk. 😋 We can code this in two ways. Method 1 We use the Vigenère Matrix to find the Cipher Text. We will create the Matrix through looping and row will be either plaintext and column will be key string. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 import java.util.* ; public class Vigenere { public static void main ( String