CI_Encrypt::_remove_cipher_noise PHP Method

_remove_cipher_noise() protected method

Function description
protected _remove_cipher_noise ( string $data, string $key ) : string
$data string
$key string
return string
    protected function _remove_cipher_noise($data, $key)
    {
        $key = $this->hash($key);
        $str = '';
        for ($i = 0, $j = 0, $ld = strlen($data), $lk = strlen($key); $i < $ld; ++$i, ++$j) {
            if ($j >= $lk) {
                $j = 0;
            }
            $temp = ord($data[$i]) - ord($key[$j]);
            if ($temp < 0) {
                $temp += 256;
            }
            $str .= chr($temp);
        }
        return $str;
    }