Convert secret port and sendall contents to bytes