src/StringLib.php
/**
     * Decrypt a String
     * @param String $encrypted_text - the message to decrypt
     * @param String $key - the key to encrypt and decrypt the message.
     * @return String - the unencrypted form of the text
     */
Decrypt a String
@param String $encrypted_text - the message to decrypt
@param String $key - the key to encrypt and decrypt the message.
@return String - the unencrypted form of the text
Decrypt a String @param String $encrypted_text - the message to decrypt @param String $key - the key to encrypt and decrypt the message . @return String - the unencrypted form of the text
public static function decrypt($encrypted_text, $key)
    {
        $md5Key = md5($key);
        $decrypted_text = mcrypt_decrypt(
            MCRYPT_RIJNDAEL_256, 
             $md5Key, 
             base64_decode($encrypted_text), 
             MCRYPT_MODE_CBC, 
             md5($md5Key)
        );
        $trimmed_decryption = rtrim($decrypted_text, "\0");
        return $trimmed_decryption;
    }
public static function decrypt ( $ encrypted_text , $ key ) { $ md5Key = md5 ( $ key ) ; $ decrypted_text = mcrypt_decrypt ( MCRYPT_RIJNDAEL_256 , $ md5Key , base64_decode ( $ encrypted_text ) , MCRYPT_MODE_CBC , md5 ( $ md5Key ) ) ; $ trimmed_decryption = rtrim ( $ decrypted_text , " \0 " ) ; return $ trimmed_decryption ; }
Decrypt a String
 @param String $encrypted_text - the message to decrypt
 @param String $key - the key to encrypt and decrypt the message.
Decrypt a String @param String $encrypted_text - the message to decrypt @param String $key - the key to encrypt and decrypt the message .