Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- My entry XD
- <?php function rotencode($string, $amount) {
- $key = substr($string, 0, 1);
- if (strlen($string) == 1) {
- return chr(ord($key) + $amount);
- } else {
- return chr(ord($key) + $amount) . rotEncode(substr($string, 1, strlen($string) - 1), $amount);
- }
- }
- if (!function_exists("rotencode")) {
- function rotencode($string, $amount) {
- $key = substr($string, 0, 1);
- if (strlen($string) == 1) {
- return chr(ord($key) + $amount);
- } else {
- return chr(ord($key) + $amount) . rotEncode(substr($string, 1, strlen($string) - 1), $amount);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement