change type of key and message body from String to byte array.