def wrap(self, message):
if self.negotiate_flags & NegotiateFlags.NTLMSSP_NEGOTIATE_SEAL:<EOL><INDENT>encrypted_message = self._seal_message(message)<EOL>signature = self._get_signature(message)<EOL>message = encrypted_message<EOL><DEDENT>elif self.negotiate_flags & NegotiateFlags.NTLMSSP_NEGOTIATE_SIGN:<EOL><INDENT>signature = self._get_signature(message)<EOL><DEDENT>else:<EOL><INDENT>signature = None<EOL><DEDENT>return message, signature<EOL>
[MS-NLMP] v28.0 2016-07-14

3.4.6 GSS_WrapEx()
Emulates the GSS_Wrap() implementation to sign and seal messages if the
correct flags are set.

:param message: The message data that will be wrapped
:return message: The message that has been sealed if flags are set
:return signature: The signature of the message, None if flags are not
    set