def encryptMessage(self, message, ad = None):
if ad == None:<EOL><INDENT>ad = self.__ad<EOL><DEDENT>header = Header(<EOL>self.pub,<EOL>self.__skr.sending_chain_length,<EOL>self.__skr.previous_sending_chain_length<EOL>)<EOL>ciphertext = self.__aead.encrypt(<EOL>message,<EOL>self.__skr.nextEncryptionKey(),<EOL>self._makeAD(header, ad)<EOL>)<EOL>return {<EOL>"<STR_LIT>"     : header,<EOL>"<STR_LIT>" : ciphertext<EOL>}<EOL>
Encrypt a message using this double ratchet session.

:param message: A bytes-like object encoding the message to encrypt.
:param ad: A bytes-like object encoding the associated data to use for message
    authentication. Pass None to use the associated data set during construction.
:returns: A dictionary containing the message header and ciphertext. The header is
    required to synchronize the double ratchet of the receiving party. Send it
    along with the ciphertext.

The returned dictionary consists of two keys: "header", which includes an instance
of the Header class and "ciphertext", which includes the encrypted message encoded
as a bytes-like object.

:raises NotInitializedException: If this double ratchet session is not yet
    initialized with the other parties public key, thus not ready to encrypt a
    message to that party.