Welcome to Encryptify! This command-line based tool allows you to encrypt and decrypt your messages using three different encryption methods. Whether you're looking for simple letter shifts or bitwise encryption, Encryptify has you covered.
- Encrypt or Decrypt: Choose between encrypting or decrypting your message.
- Three Encryption Methods: Rot13, Reverse, and XOR.
- Simple Command-Line Interface: Easily navigate using numbers to select encryption types and input your message.
Run the following command to execute:
go run encryptify.go
After executing the program, follow these steps:
-
Welcome Message: You will be greeted with:
Welcome to the Encryptify!
-
Select Operation: Choose either encryption or decryption by typing:
- 1: Encrypt
- 2: Decrypt
-
Choose Encryption Method: After selecting the operation, choose one of the following encryption methods:
- 1: Rot13
- 2: Reverse
- 3: XOR
-
Input Message: Enter your message and press Enter.
- For XOR encryption, you'll be prompted for a key. This key is essential for both encryption and decryption.
-
Encrypted/Decrypted Message: The result will be displayed on the screen.
Rot13 encryption shifts each letter in the alphabet by 13 positions. This method is its own inverse: applying it twice will return the original text.
Example:
Input: Hello World!
Encrypted: Uryyb Jbeyq!
Decrypted: Hello World!
The Reverse method swaps each letter in the message with its reverse counterpart in the alphabet (A ↔ Z, B ↔ Y, etc.).
Example:
Input: Hello
Encrypted: Svool
Decrypted: Hello
XOR encryption uses a bitwise exclusive OR operation. The user provides a key, which is applied to the message bit by bit.
Example:
- Message: "Hello"
- Key: 42
- Encrypted Output (hex):
1e1c001604341d111f150f371d04250c26001002
- Decrypted Output:
Hello