protected function _decrypt($encrypted) {
		$secret = $this->_hashSecret($this->_config['secret']);

		$vectorSize = strlen(base64_encode(str_repeat(" ", static::_vectorSize())));
		$vector = base64_decode(substr($encrypted, -$vectorSize));
		$data = base64_decode(substr($encrypted, 0, -$vectorSize));

		mcrypt_generic_init(static::$_resource, $secret, $vector);
		$decrypted = mdecrypt_generic(static::$_resource, $data);
		mcrypt_generic_deinit(static::$_resource);

		return unserialize(trim($decrypted));
	}
protected function _decrypt($encrypted) {
		$secret = $this->_hashSecret($this->_config['secret']);

		$vectorSize = strlen(base64_encode(str_repeat(" ", static::_vectorSize())));
		$vector = base64_decode(substr($encrypted, -$vectorSize));
		$data = base64_decode(substr($encrypted, 0, -$vectorSize));

		mcrypt_generic_init(static::$_resource, $secret, $vector);
		$decrypted = mdecrypt_generic(static::$_resource, $data);
		mcrypt_generic_deinit(static::$_resource);

		return unserialize(trim($decrypted));
	}
protected function _decrypt ( $ encrypted ) { $ secret = $ this -> _hashSecret ( $ this -> _config [ 'secret' ] ) ; $ vectorSize = strlen ( base64_encode ( str_repeat ( " " , static :: _vectorSize ( ) ) ) ) ; $ vector = base64_decode ( substr ( $ encrypted , - $ vectorSize ) ) ; $ data = base64_decode ( substr ( $ encrypted , 0 , - $ vectorSize ) ) ; mcrypt_generic_init ( static :: $ _resource , $ secret , $ vector ) ; $ decrypted = mdecrypt_generic ( static :: $ _resource , $ data ) ; mcrypt_generic_deinit ( static :: $ _resource ) ; return unserialize ( trim ( $ decrypted ) ) ; }
Decrypt and unserialize a previously encrypted string.

@param string $encrypted The base64 encoded and encrypted string.
@return array The cleartext data.
Decrypt and unserialize a previously encrypted string .