src/StringLib.php
/**
     * Encrypt a String
     * @param String $message - the message to encrypt
     * @param String $key - the key to encrypt and then decrypt the message.
     * @return String - the encryptd form of the string
     */
Encrypt a String
@param String $message - the message to encrypt
@param String $key - the key to encrypt and then decrypt the message.
@return String - the encryptd form of the string
Encrypt a String @param String $message - the message to encrypt @param String $key - the key to encrypt and then decrypt the message . @return String - the encryptd form of the string
public static function encrypt($message, $key)
    {
        $md5Key = md5($key);
        $encrypted = mcrypt_encrypt(
            MCRYPT_RIJNDAEL_256, 
            $md5Key, 
            $message, 
            MCRYPT_MODE_CBC, 
            md5($md5Key)
        );
        $encoded_encryption = base64_encode($encrypted);
        return $encoded_encryption;
    }
public static function encrypt ( $ message , $ key ) { $ md5Key = md5 ( $ key ) ; $ encrypted = mcrypt_encrypt ( MCRYPT_RIJNDAEL_256 , $ md5Key , $ message , MCRYPT_MODE_CBC , md5 ( $ md5Key ) ) ; $ encoded_encryption = base64_encode ( $ encrypted ) ; return $ encoded_encryption ; }
Encrypt a String
 @param String $message - the message to encrypt
 @param String $key - the key to encrypt and then decrypt the message.
Encrypt a String @param String $message - the message to encrypt @param String $key - the key to encrypt and then decrypt the message .