Splitted the SecureMessage method for a better readability.