namespace MiniOrange\IDPSaml\Helper;
class IDPZendUtility
{
public static function base64Decode($TC)
{
$Kq = base64_decode($TC);
return $Kq;
}
public static function gzDeflate($Ib)
{
$ZL = ["level" => 9, "mode" => "deflate", "archive" => null];
$br = new \Zend_Filter_Compress_Gz($ZL);
return $br->compress($Ib);
}
public static function gzInflate($Ib)
{
$ZL = ["level" => 9, "mode" => "deflate", "archive" => null];
$br = new \Zend_Filter_Compress_Gz($ZL);
return $br->decompress($Ib);
}
public static function getRandomASCIIString($vc)
{
$ZJ = ["�", " ", "!", """, "#", "$", "%", "&", "'", "(", ")", "*", "+", ",", "-", , "/", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ":", ";", "<", "=", ">", "?", "@", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "[", "\", "]", "^", "_", "`", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "{", "|", "}", "~", ""];
$Oy = sizeof($ZJ);
if (!($vc < 0)) {
goto ZP;
}
$vc += $Oy - 1;
ZP:
$vc %= $Oy;
return $ZJ[$vc];
}
public static function encryptMcrypt($TC)
{
$YA = new \Zend_Filter_Encrypt_Mcrypt(["compression" => '']);
return $YA->encrypt($TC);
}
public static function decryptMcrypt($TC)
{
$YA = new \Zend_Filter_Encrypt_Mcrypt(["compression" => '']);
return $YA->decrypt($TC);
}
}
© 2023 Quttera Ltd. All rights reserved.