jacekwilczynski

Untitled

Apr 4th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.28 KB | None | 0 0
  1. class ShitCrypt
  2. {
  3.     public static function encrypt(string $data, int $key): string
  4.     {
  5.         $numbers = [];
  6.         for ($i = 0; $i < strlen($data); $i++) {
  7.             $numbers[] = dechex(ord($data[$i]) + $key + $i);
  8.         }
  9.  
  10.         return join('-', $numbers);
  11.     }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment