Encode messages with base64 before sending through a socket
Move base64 encoding/decoding in a utility class