Created
June 21, 2021 10:44
-
-
Save Los-had/6dd6c65706cb575412260c3061230423 to your computer and use it in GitHub Desktop.
Quebrando a cifra de César com php
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
function cesar_crack_ascii($ut) { | |
$txt = $ut; | |
$ftxt = ''; | |
$v = str_split($txt); | |
$len = strlen($txt); | |
for ($nc = 0; $nc <= 26; $nc++) { | |
for ($g = 0; $g <= $len; $g++) { | |
$c = ord(@$v[$g]) - $nc; | |
$ftxt = $ftxt.chr($c); | |
} | |
echo $ftxt . "<br>"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment