android Display platforms icon
android windows mac
E MACHINE icon

E MACHINE

9.8
Dev Onboard
0 reviews
23 downloads

Encrypt your text

Advertisement
Advertisement

The text encryption and decryption machine I provided earlier uses a simple Caesar Cipher algorithm. Here's how it works:

1. The user enters a shift value (an integer) and a message into the corresponding input fields.

2. When the user clicks the "Encrypt" button, the `encrypt()` function is called.

3. Inside the `encrypt()` function, the shift value and the message are retrieved from the input fields.

4. A variable called `encryptedMessage` is initialized to store the encrypted message.

5. The function iterates over each character in the message. For each character:

- The character is converted to its Unicode character code using `charCodeAt()`.

- If the character is an uppercase letter (from 'A' to 'Z'), its Unicode value is adjusted by the shift value using modular arithmetic to wrap around the alphabet. The adjusted Unicode value is converted back to its corresponding character using `String.fromCharCode()`.

- If the character is a lowercase letter (from 'a' to 'z'), the same process is performed.

- If the character is not an alphabetic character (e.g., space, punctuation), it is left unchanged.

6. The resulting encrypted characters are concatenated and stored in the `encryptedMessage` variable.

7. The `encryptedMessage` is then displayed in the "Encrypted Message" textarea.

8. Similarly, when the user clicks the "Decrypt" button, the `decrypt()` function is called.

9. Inside the `decrypt()` function, the shift value and the encrypted message are retrieved.

10. A variable called `decryptedMessage` is initialized to store the decrypted message.

11. The function iterates over each character in the encrypted message. For each character:

- The character is converted to its Unicode character code.

- If the character is an uppercase letter, its Unicode value is adjusted by subtracting the shift value and performing modular arithmetic to wrap around the alphabet.

- If the character is a lowercase letter, the same process is performed.

- If the character is not an alphabetic character, it is left unchanged.

12. The resulting decrypted characters are concatenated and stored in the `decryptedMessage` variable.

13. The `decryptedMessage` is then displayed in the "Decrypted Message" textarea.

Additionally, there are options to copy the encrypted or decrypted text to the clipboard by clicking the "Copy" icon next to each textarea. The "Clear" icon can be used to clear the contents of each textarea.

This is a simplified example, and the Caesar Cipher is not a secure encryption algorithm for real-world applications. It's important to note that for secure encryption and decryption, you should use well-established cryptographic algorithms and libraries.

Reviewed by Alberto García Translated by Uptodown Localization Team

Requirements (Latest version)

  • Android 4.4 or higher required
Advertisement

More information

Package Name e.machine
License Free
Op. System Android
Category Security/Performance
Language English
46 more
Author smdsujon099
Downloads 23
Date Dec 19, 2023
Advertisement This app contains ads

Rate this App

Review the app
E MACHINE icon

Comments

There are no opinions about E MACHINE yet. Be the first! Comment

Advertisement
Advertisement
Calculator Lock - Video Lock & Photo Vault – HideX icon
Hide private information with an app that looks like a calculator
Samsung Good Lock icon
Customize your Samsung smartphone's lock screen
Xiaomi Security icon
Xiaomi's official security and maintenance app
Game Booster 4x Faster icon
Optimize your Android to play the most demanding games
AppLock icon
Put a lock on any part of your Android device
AnTuTu 3DBench Lite icon
Carry out a 3D rendering test on your smartphone
Microsoft Authenticator icon
Microsoft's two-factor authentication
Google Find My Device icon
Never lose your smartphone again
O-Xyde icon
Versatile Wear OS watch face app with extensive customization options
Farmi icon
Precision farm management app with real-time weather and market insights
2Accounts icon
Use two accounts for the same app simultaneously
U-tec icon
Smart, keyless, remote door access control via app
Pixels HD icon
Advanced 24-hour remote video surveillance app with QR and PTZ control
Lock Screen icon
Robust phone lock app with customizable privacy protection and app security
玲珑加速器 - 专业手游加速器 icon
A professional gaming accelerator that provides fast and stable gameplay experiences.
Butterfly Analog Clock Wallpaper icon
Customize with elegant butterfly-themed clock wallpapers and 3D effects