home/includes/functions.php
/*
     * Function to Encrypt sensitive data for storing in the database
     *
     * @param string	$value		The text to be encrypted
	 * @param 			$encodeKey	The Key to use in the encryption
     * @return						The encrypted text
     */
Function to Encrypt sensitive data for storing in the database
@param string    $value          The text to be encrypted
@param                       $encodeKey      The Key to use in the encryption
@return                                          The encrypted text
Function to Encrypt sensitive data for storing in the database @param string $value The text to be encrypted @param $encodeKey The Key to use in the encryption @return The encrypted text
function encryptIt($value) {
		$encodeKey = 'dS+D.f^Li1KUqJ4tgX14`Jy,A9ejk?uwnXaNSD@fQ+dCZIF!';
		$encoded = base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, md5($encodeKey), $value, MCRYPT_MODE_CBC, md5(md5($encodeKey))));
		return($encoded);
	}
function encryptIt ( $ value ) { $ encodeKey = 'dS+D.f^Li1KUqJ4tgX14`Jy,A9ejk?uwnXaNSD@fQ+dCZIF!' ; $ encoded = base64_encode ( mcrypt_encrypt ( MCRYPT_RIJNDAEL_256 , md5 ( $ encodeKey ) , $ value , MCRYPT_MODE_CBC , md5 ( md5 ( $ encodeKey ) ) ) ) ; return ( $ encoded ) ; }
Function to Encrypt sensitive data for storing in the database
 @param string    $value          The text to be encrypted
 @param                       $encodeKey      The Key to use in the encryption
 @return                                          The encrypted text
Function to Encrypt sensitive data for storing in the database @param string $value The text to be encrypted @param $encodeKey The Key to use in the encryption @return The encrypted text
// The encodeKey MUST match the decodeKey