novia713 / setara
A trivial way for hiding text from simple view.
Installs: 7
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 0
Open Issues: 0
Type:project
Requires (Dev)
- phpunit/phpunit: ^5.7
- raveren/kint: ^1.0
This package is not auto-updated.
Last update: 2025-03-01 22:10:10 UTC
README
🙈 Setara is a php class for hiding texts from simple view
CAUTION: this is NOT strong encryption use this only for disabling simple view reading texts not for encryption, this is not serious ^^
Instantiation
require __DIR__ . "/vendor/autoload.php";
use Novia713\Setara\Setara;
// Provide as argument a capitalized name of a 1st gen Pokemon
$setara = new Setara("Lapras");
Hide
$setara->enc($my_string);
Reveal
$setara->dec($my_string);
Explanation
This simply uses chr()
and ord()
to convert letters to numbers, using a Pokemon name as seed for displacement.
I would use this only for standard and common ascii letters.
Examples
For example, "Hallo" string using "Bulbasaur" as Pokemon seed reads as 73 98 109 109 112
"Hallo" string using "Mew" as Pokemon seed reads as 223 248 259 259 262
This way you can't read the string on simple viw. That's it!