rework EncryptMessage/DecryptMessage
remove unused code