public function decrypt($string)
  {
    $string = base64_decode($string);
    $decryp = "";
    $length = strlen($string);
    $string .= str_repeat(chr(0), (8-($length%8))%8);

    for($i = 0; $i < $length; $i += 8)
    {
      list(,$xl,$xr) = unpack("N2", substr($string, $i, 8));
      $this->decipher($xl, $xr);
      $decryp .= pack("N2", $xl, $xr);
    }

    return trim($decryp);
  }
public function decrypt($string)
  {
    $string = base64_decode($string);
    $decryp = "";
    $length = strlen($string);
    $string .= str_repeat(chr(0), (8-($length%8))%8);

    for($i = 0; $i < $length; $i += 8)
    {
      list(,$xl,$xr) = unpack("N2", substr($string, $i, 8));
      $this->decipher($xl, $xr);
      $decryp .= pack("N2", $xl, $xr);
    }

    return trim($decryp);
  }
public function decrypt ( $ string ) { $ string = base64_decode ( $ string ) ; $ decryp = "" ; $ length = strlen ( $ string ) ; $ string .= str_repeat ( chr ( 0 ) , ( 8 - ( $ length % 8 ) ) % 8 ) ; for ( $ i = 0 ; $ i < $ length ; $ i += 8 ) { list ( , $ xl , $ xr ) = unpack ( "N2" , substr ( $ string , $ i , 8 ) ) ; $ this -> decipher ( $ xl , $ xr ) ; $ decryp .= pack ( "N2" , $ xl , $ xr ) ; } return trim ( $ decryp ) ; }
Decrypts a given string.

@param string $string
@return string
Decrypts a given string .