public static function _decryptRijndael256 ($str, $key, $iv)
	{
		
		// If the string is empty
		
		if (empty ($str))
		{
			return '';
		}
		
		// Open the cypher
		
		$cypher		= mcrypt_module_open ('rijndael-256', '', 'ofb', '');
		
		// Set Key
		
		$key		= substr ($key, 0, mcrypt_enc_get_key_size ($cypher));
		
		// Initialise decryption
		
		mcrypt_generic_init ($cypher, $key, $iv);
		
		// Decrypt String
		
		$decrypted	= mdecrypt_generic ($cypher, $str);
		
		// Terminate encryption hander
		
		mcrypt_generic_deinit ($cypher);
		
		// Close Module
		
		mcrypt_module_close ($cypher);
		
		// Return decrypted string
		
		return $decrypted;
		
	}
public static function _decryptRijndael256 ($str, $key, $iv)
	{
		
		// If the string is empty
		
		if (empty ($str))
		{
			return '';
		}
		
		// Open the cypher
		
		$cypher		= mcrypt_module_open ('rijndael-256', '', 'ofb', '');
		
		// Set Key
		
		$key		= substr ($key, 0, mcrypt_enc_get_key_size ($cypher));
		
		// Initialise decryption
		
		mcrypt_generic_init ($cypher, $key, $iv);
		
		// Decrypt String
		
		$decrypted	= mdecrypt_generic ($cypher, $str);
		
		// Terminate encryption hander
		
		mcrypt_generic_deinit ($cypher);
		
		// Close Module
		
		mcrypt_module_close ($cypher);
		
		// Return decrypted string
		
		return $decrypted;
		
	}
public static function _decryptRijndael256 ( $ str , $ key , $ iv ) { // If the string is empty if ( empty ( $ str ) ) { return '' ; } // Open the cypher $ cypher = mcrypt_module_open ( 'rijndael-256' , '' , 'ofb' , '' ) ; // Set Key $ key = substr ( $ key , 0 , mcrypt_enc_get_key_size ( $ cypher ) ) ; // Initialise decryption mcrypt_generic_init ( $ cypher , $ key , $ iv ) ; // Decrypt String $ decrypted = mdecrypt_generic ( $ cypher , $ str ) ; // Terminate encryption hander mcrypt_generic_deinit ( $ cypher ) ; // Close Module mcrypt_module_close ( $ cypher ) ; // Return decrypted string return $ decrypted ; }
Decrypt and return a string using the Rijndael 256 cypher
@param string $str String to decrypt
@param string $key Key to decrypt the string
@param string $ic Initialisation vector
@return string
Decrypt and return a string using the Rijndael 256 cypher