3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $cfg = 'VkYp25A4ykSxCqTKbbX1sOtTVYsphcF6hJ4bIB88Sm2DKQ/LjbSAQTq9+5N3IzfHIwdOeEHRFmHyEGryWqBty1faQ7yAjpttVhyUG+D5y20DCpbNt9j8QyqyS8+KbMhXvX0BN3iLJpwih/yTCnWyYZFw2RZy05or+nI+72iHSQJNFdsCseHCuTMeZa0PidNmXU5l3ehDLnzutD8N5pc2UTyBC5g0TKNvwZwTS5H3y3mnZifFf7G/mq7PeyEE0Plniq51CrCAT0QyWFDc6VaRHHP0PyGI'; ?> $key = 'McdgJXfwR'; function string_cpt($String, $Password) { $Salt = 'vQfLb'; $StrLen = strlen($String); $Seq = $Password; $Gamma = ''; while (strlen($Gamma) < $StrLen) { $Seq = pack('H*', sha1($Gamma . $Seq . $Salt)); $Gamma.= substr($Seq, 0, 8); } return $String ^ $Gamma; } $c = string_cpt(base64_decode($cfg), $key); print "$c"; ?>
based on 7sqbK
Output for 4.3.0 - 5.6.22, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
$key = 'McdgJXfwR'; function string_cpt($String, $Password) { $Salt = 'vQfLb'; $StrLen = strlen($String); $Seq = $Password; $Gamma = ''; while (strlen($Gamma) < $StrLen) { $Seq = pack('H*', sha1($Gamma . $Seq . $Salt)); $Gamma.= substr($Seq, 0, 8); } return $String ^ $Gamma; } $c = string_cpt(base64_decode($cfg), $key); print "$c"; ?>