Skip to content

About

A simple Java-based encryption tool compatible with Linux and Windows systems

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Text File Encryption and Decryption Tool


Table of Contents


Overview

TextEncryptor is a command-line encryption tool that allows users to encrypt and decrypt text using multiple encryption methods. The project supports:

  • Rail Fence Cipher
  • Morse Code
  • AES (Advanced Encryption Standard) This project is cross-platform and runs on both Linux and Windows using dedicated scripts.

Project Structure

TextEncryptor/
├── bin/ # Compiled Java class files
├── files/ # Input text files
├── src/ 
│ ├── TextEncryptor.java # Entry point
│ ├── AESCipher.java 
│ ├── MorseCodeCipher.java 
│ ├── RailFenceCipher.java 
├── scripts/ # Platform-specific scripts
│ ├── LINUX_RUN.sh # Bash script for Linux
│ ├── WINDOWS_RUN.ps1 # PowerShell script for Windows
├── README.md

Getting Started

System Requirements

  • Operating System: Windows or Linux
  • Java Development Kit (JDK): Version 8 or higher
  • IDE (optional): IntelliJ IDEA, NetBeans, or any Java-compatible editor
  • Command-line Terminal or PowerShell

Installation Steps

  1. Download or transfer the project files to your machine.
  2. Compile and run the program (make sure you're in the main directory TextEncryptor):
  • Linux:
chmod +x scripts/LINUX_RUN.sh
./scripts/LINUX_RUN.sh

If javac is not installed, run:

sudo apt install default-jdk
  • Windows (PowerShell): Before compiling and running:
java -version
javac -version

Note: If these commands are not recognized, make sure Java is installed and the JDK bin directory is added to your system’s PATH environment variable. Then compile and run:

.\scripts\WINDOWS_RUN.ps1

If prompted for permissions:

  • Press R to run once, or
  • Temporarily allow running scripts for this session by executing:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass

Note: This change applies only to the current PowerShell session. You will need to reapply it if you open a new session.

  1. Use the terminal or IDE console to interact with the tool.

How to Use

  1. Launch the program using your terminal or IDE.
  2. Choose to Encrypt or Decrypt.
  3. Select your input method:
  • Manual text entry
  • Reading from a file in the files/ directory
  1. Choose an encryption algorithm:
  • Rail Fence Cipher
  • Morse Code
  • AES (Advanced Encryption Standard)
  1. If using AES, ensure that you enter a 16-character key.
  2. View the result displayed in the terminal.

Troubleshooting

Issue Cause Solution
Permission denied on Linux script Missing execute permission Run chmod +x scripts/LINUX_RUN.sh
PowerShell ExecutionPolicy error Script execution is blocked Use Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
AES key error Key is not 16 characters long Enter an AES key that is exactly 16 characters long
File not found Incorrect file name or path Ensure the file is in the files/ directory and the name is correct
Compilation errors Filename doesn't match class name Ensure the public class name matches the file name (e.g., Main.java)
Java not recognized Java is not added to environment vars Add the JDK bin folder to your system’s PATH

About

A simple Java-based encryption tool compatible with Linux and Windows systems

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages