Awesome
Obfuscate
A quick-and-dirty library to obfuscate sensitive strings by dynamically creating special characters to print them out. Not foolproof by any means.
Installation
composer require joetannenbaum/obfuscate
Usage
use Obfuscate\Obfuscate;
require __DIR__ . '/vendor/autoload.php';
echo Obfuscate::str('this is a secret!');
echo Obfuscate::mailto('obfuscate@joe.codes');
...results in (different every time, still renders properly in HTML):
this is a secret!
<a href="mailto:obfuscate@joe.codes">obfuscate@joe.codes</a>
Laravel
If you're using Laravel, this package automatically adds a Blade helper:
@obfuscate('this is a secret!')
@mailto('obfuscate@joe.codes')