includes/rijndael.php
changeset 1330 1649f687e69e
parent 1327 e8f4dea267c8
equal deleted inserted replaced
1329:61d87ee12e80 1330:1649f687e69e
  1490  	* @return string
  1490  	* @return string
  1491  	*/
  1491  	*/
  1492 	
  1492 	
  1493 	public function encrypt($plaintext, $key, $return_format = ENC_HEX)
  1493 	public function encrypt($plaintext, $key, $return_format = ENC_HEX)
  1494 	{
  1494 	{
  1495 		return $this->encrypt_cbc($plaintext, $key, '00000000000000000000000000000000', ENC_HEX);
  1495 		return $this->encrypt_cbc($plaintext, $key, '00000000000000000000000000000000', $return_format);
  1496 	}
  1496 	}
  1497 	
  1497 	
  1498 	/**
  1498 	/**
  1499  	* Wrapper for decryption.
  1499  	* Wrapper for decryption.
  1500  	* @param string Encrypted text
  1500  	* @param string Encrypted text
  1504  	* @return string
  1504  	* @return string
  1505  	*/
  1505  	*/
  1506 	
  1506 	
  1507 	public function decrypt($cryptext, $key, $input_format = ENC_HEX, $no_cache = false)
  1507 	public function decrypt($cryptext, $key, $input_format = ENC_HEX, $no_cache = false)
  1508 	{
  1508 	{
  1509 		return $this->decrypt_cbc($cryptext, $key, '00000000000000000000000000000000', ENC_HEX, $no_cache);
  1509 		return $this->decrypt_cbc($cryptext, $key, '00000000000000000000000000000000', $input_format, $no_cache);
  1510 	}
  1510 	}
  1511 	
  1511 	
  1512 	/**
  1512 	/**
  1513  	* Wrapper for CBC encryption.
  1513  	* Wrapper for CBC encryption.
  1514  	* @param string Plain text to encrypt
  1514  	* @param string Plain text to encrypt