Created
February 22, 2018 08:58
-
-
Save mmeyer2k/be34300c5d17305e2ce832d25c6e9acd to your computer and use it in GitHub Desktop.
A ROT128 binary encoder
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$rot128 = function (string $input) { | |
foreach (str_split($input) as $i => $a) { | |
$input[$i] = chr((ord($a) + 128) % 256); | |
} | |
return $input; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment