Abd Alftah Salem
Hire me
←All case studies

Case study · Open source

Thunder Encryption

A dependency-free Dart library that turns English and Arabic text into unreadable cipher text and back, with a fresh random key hidden inside every cipher.

01Problem

Simple reversible text protection — in Arabic too

Apps sometimes need to make text unreadable at a glance — in local storage, logs or QR payloads — without key management or native plugins. Most small Dart helpers only handle Latin text. Thunder Encryption supports English and Arabic letters, digits and common symbols in pure Dart, on every platform including web.

02My role

Creator and maintainer

I wrote the cipher and the package (first published January 2025) and maintain it.

03How it works

A random key, hidden in the cipher

Each call picks six random letters from the alphabet and derives a numeric key from their positions. The text is mapped to numbers and shifted in repeated rounds driven by that key; the six key letters are then embedded at fixed positions inside the cipher, with a length marker. Decryption extracts the letters, rebuilds the key and reverses the rounds — so the same text gives a different cipher every time and there is no key to store.

Encrypt / decrypt

Encrypt / decryptPlain textArabic · English · digits6 random letters→ numeric keyShift roundscount set by the keyCipher textkey letters + length embeddedDecryptextract key → reverse rounds
$ dart pub add thunder_encryption
# Dart
final cipher = TextEncryption.textEncryption("عبد الفتاح نضال الشنطي");
final plain  = TextDecryption.textDecryption(cipher);

04Key technical decisions

The choices that shaped it

No key to manage

Hiding a per-call key inside the cipher removes key storage entirely — the right trade-off for obfuscation, and stated plainly as not a replacement for audited cryptography such as AES.

Pure Dart, every platform

No native code and no dependencies, so it runs the same in Flutter mobile, desktop and web.

Alphabets as data

Each language is a pair of maps (letter → value, value → letter), so contributors can add a language without touching the cipher.

05Hard parts solved

What made it more than a script

No more silent data loss

Characters outside the alphabet (, . line breaks, emoji) used to be encrypted as a. 1.1.0 throws an ArgumentError naming the character — and old ciphers still decrypt, because the alphabet and format didn't change.

A package five times smaller

The published archive had carried a whole Flutter app scaffold; removing it took the package from 321 KB to 65 KB.

06Outcome

Smaller, tested, documented

1.1.0 added 13 real tests, CI, API documentation and an honest security note in the README.

13tests (was 0)
65 KBpackage archive (was 321 KB)
0dependencies

Package archive size

v1.0.0321 KB
v1.1.065 KB

Measured with the publish dry-run.

07Stack & links

Built with

© 2026 Abd Alftah Salem · Back to portfolio