Created
March 22, 2025 16:25
-
-
Save rudiedirkx/53d12bc00ec1cf6bdf06ae0035687a34 to your computer and use it in GitHub Desktop.
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 | |
function incrotate(int $startLength, string $in) : string { | |
$len = $startLength; | |
$out = ''; | |
while (strlen($out) < strlen($in)) { | |
$part = substr($in, strlen($out), $len); | |
$out .= strrev($part); | |
$len++; | |
} | |
return $out; | |
} | |
$in = json_encode([ | |
'oele' => 'boele', | |
'bla' => 'dus want', | |
'foo' => 'bar', | |
'baz' => 123, | |
]); | |
$out = incrotate(2, base64_encode($in)); | |
var_dump($out); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment