private static function decryptStandard(
        $hash,
        $crypt_text,
        $method,
        $iv
    ) {
        if (substr($iv, 0, strlen($method)) !== $method) {
            return null;
        }

        /**
         * ------------------------------------
         * Doing convert encrypted string
         * ------------------------------------
         */
        /**
         * Doing decode of input encryption
         */
        $crypt_text = self::safeBase64Decode($crypt_text);
        $enc_arr  = str_split($crypt_text);
        $add = 0;
        $div = strlen($crypt_text) / strlen($hash);
        $new_pass = '';
        while ($add <= $div) {
            $new_pass .= $hash;
            $add++;
        }
        $pass_arr = str_split($new_pass);
        $ascii ='';
        foreach ($enc_arr as $key => $asc) {
            $pass_int = ord($pass_arr[$key]);
            $enc_int = ord($asc);
            $str_int = $enc_int - $pass_int;
            $ascii .= chr(($str_int-strlen($crypt_text)));
        }

        /* --------------------------------
         * reversing
         * ------------------------------ */
        // unpack
        $unpack     = unpack('a*', trim($ascii));

        /**
         * if empty return here
         */
        if (empty($unpack)) {
            return null;
        }

        // implode the unpacking array
        $unpack = implode('', (array) $unpack);
        $iv     = substr($iv, strlen($method));
        if (strlen($hash) < strlen($unpack)) {
            $sub_iv = substr($unpack, strlen($hash), strlen($iv));
        } else {
            $sub_iv = substr($unpack, -strlen($iv));
        }
        if ($sub_iv !== $iv) {
            return null;
        }
        $crypt_text = substr_replace($unpack, '', strlen($hash), strlen($iv));
        return self::rotate($crypt_text, -(strlen($hash) % 13));
    }
private static function decryptStandard(
        $hash,
        $crypt_text,
        $method,
        $iv
    ) {
        if (substr($iv, 0, strlen($method)) !== $method) {
            return null;
        }

        /**
         * ------------------------------------
         * Doing convert encrypted string
         * ------------------------------------
         */
        /**
         * Doing decode of input encryption
         */
        $crypt_text = self::safeBase64Decode($crypt_text);
        $enc_arr  = str_split($crypt_text);
        $add = 0;
        $div = strlen($crypt_text) / strlen($hash);
        $new_pass = '';
        while ($add <= $div) {
            $new_pass .= $hash;
            $add++;
        }
        $pass_arr = str_split($new_pass);
        $ascii ='';
        foreach ($enc_arr as $key => $asc) {
            $pass_int = ord($pass_arr[$key]);
            $enc_int = ord($asc);
            $str_int = $enc_int - $pass_int;
            $ascii .= chr(($str_int-strlen($crypt_text)));
        }

        /* --------------------------------
         * reversing
         * ------------------------------ */
        // unpack
        $unpack     = unpack('a*', trim($ascii));

        /**
         * if empty return here
         */
        if (empty($unpack)) {
            return null;
        }

        // implode the unpacking array
        $unpack = implode('', (array) $unpack);
        $iv     = substr($iv, strlen($method));
        if (strlen($hash) < strlen($unpack)) {
            $sub_iv = substr($unpack, strlen($hash), strlen($iv));
        } else {
            $sub_iv = substr($unpack, -strlen($iv));
        }
        if ($sub_iv !== $iv) {
            return null;
        }
        $crypt_text = substr_replace($unpack, '', strlen($hash), strlen($iv));
        return self::rotate($crypt_text, -(strlen($hash) % 13));
    }
private static function decryptStandard ( $ hash , $ crypt_text , $ method , $ iv ) { if ( substr ( $ iv , 0 , strlen ( $ method ) ) !== $ method ) { return null ; } /**
         * ------------------------------------
         * Doing convert encrypted string
         * ------------------------------------
         */ /**
         * Doing decode of input encryption
         */ $ crypt_text = self :: safeBase64Decode ( $ crypt_text ) ; $ enc_arr = str_split ( $ crypt_text ) ; $ add = 0 ; $ div = strlen ( $ crypt_text ) / strlen ( $ hash ) ; $ new_pass = '' ; while ( $ add <= $ div ) { $ new_pass .= $ hash ; $ add ++ ; } $ pass_arr = str_split ( $ new_pass ) ; $ ascii = '' ; foreach ( $ enc_arr as $ key => $ asc ) { $ pass_int = ord ( $ pass_arr [ $ key ] ) ; $ enc_int = ord ( $ asc ) ; $ str_int = $ enc_int - $ pass_int ; $ ascii .= chr ( ( $ str_int - strlen ( $ crypt_text ) ) ) ; } /* --------------------------------
         * reversing
         * ------------------------------ */ // unpack $ unpack = unpack ( 'a*' , trim ( $ ascii ) ) ; /**
         * if empty return here
         */ if ( empty ( $ unpack ) ) { return null ; } // implode the unpacking array $ unpack = implode ( '' , ( array ) $ unpack ) ; $ iv = substr ( $ iv , strlen ( $ method ) ) ; if ( strlen ( $ hash ) < strlen ( $ unpack ) ) { $ sub_iv = substr ( $ unpack , strlen ( $ hash ) , strlen ( $ iv ) ) ; } else { $ sub_iv = substr ( $ unpack , - strlen ( $ iv ) ) ; } if ( $ sub_iv !== $ iv ) { return null ; } $ crypt_text = substr_replace ( $ unpack , '' , strlen ( $ hash ) , strlen ( $ iv ) ) ; return self :: rotate ( $ crypt_text , - ( strlen ( $ hash ) % 13 ) ) ; }
Decrypt string container crypt text

@param string $hash
@param string $crypt_text
@param string $method
@param string $iv
@return null|string
Decrypt string container crypt text