Caesar Cipher program

This program is to demonstrate the working of the Caesar Cipher, which is the simplest encryption technique. This program will convert plain text to cipher text and vice-versa.

Caesar Cipher at Wikipedia:

The program runs through two loops. One to traverse each alphabet of the text and the other to compare the alphabet with alphabets from a-z and then do the needed replacements.


The following two tabs change content below.
  • Elan

    Hi there

    i would like to intergrate this caesar cipher with my GUI in Netbeans.How can I make that my “action performed” buttons co-link with this code?


    • admin

      You just have to do the modifications to the if condition in the actionPerformed method.

      Just change the butEncrypt to your GUI button name for encryption.
      if(ae.getSource()== butEncrypt)

  • Elan

    Thanks!.Could you maybe explain the encryption part.