✏️ 正在编辑: Crypt.php
路径:
/srv/systems_dir/contemax/library/Core/Crypt.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php class Core_Crypt { static $chave = "xy"; static function StringXor($a, $b) { if( $a == '' ) return ''; $retorno = ""; $i = strlen($a) - 1; $j = strlen($b); do { $retorno .= ($a{$i} ^ $b{$i % $j}); } while ( $i-- ); return strrev($retorno); } static function Encrypt($string) { return base64_encode(Core_Crypt::StringXor($string, Core_Crypt::$chave)); } static function Decrypt($string) { return Core_Crypt::StringXor(base64_decode($string), Core_Crypt::$chave); } }
💾 保存文件
← 返回文件管理器