Java,  Programming

Java Tutorial: Easy & Simple ROT13 Encryption and Decryption

JAVA: Easy and Simple ROT13

ROT13 is the simplest and easiest way to encrypt and decrypt (cipher) a string of text! On this java application I have created a very simple java app to encrypt/decrypt a string of text using ROT13. ROT13 is basically another substitution cipher technique (part of the Caesar cipher) that replaces a letter with the thirteenth letter after it (ROT13 = “rotate by 13 places”).

ROT13 Example from Wikipedia
ROT13 Example from Wikipedia

Getting Started

Just download the java file and then run it on your computer. I have commented the code and so you can just view my comments to understand how the code works. It is so easy that beginner programmers should be able to understand it.
Enjoy!

Instructions

1. Run the .java file and follow the instruction on the console

Input string to encrypt/decrypt then press enter:

2. Type the string to encrypt/decrypt on the console

Input string to encrypt/decrypt then press enter: This is a secret text!

3. Press enter to process the text

4. View the results!

Input string to encrypt/decrypt then press enter: This is a secret text!
---
String Before:
This is a secret text!
---
String After:
Guvf vf n frperg grkg!

Source Code

You can download the source code on my Github page https://github.com/jamesadhitthana/SimpleROT13/blob/master/Rot13.java or you can see it below.

Author

Acknowledgments

One Comment

Leave a Reply

Your email address will not be published. Required fields are marked *