MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / auth_cram_md5

Method auth_cram_md5

tools/python-3.11.9-amd64/Lib/smtplib.py:664–671  ·  view source on GitHub ↗

Authobject to use with CRAM-MD5 authentication. Requires self.user and self.password to be set.

(self, challenge=None)

Source from the content-addressed store, hash-verified

662 raise SMTPAuthenticationError(code, resp)
663
664 def auth_cram_md5(self, challenge=None):
665 """ Authobject to use with CRAM-MD5 authentication. Requires self.user
666 and self.password to be set."""
667 # CRAM-MD5 does not support initial-response.
668 if challenge is None:
669 return None
670 return self.user + " " + hmac.HMAC(
671 self.password.encode('ascii'), challenge, 'md5').hexdigest()
672
673 def auth_plain(self, challenge=None):
674 """ Authobject to use with PLAIN authentication. Requires self.user and

Callers

nothing calls this directly

Calls 2

hexdigestMethod · 0.80
encodeMethod · 0.45

Tested by

no test coverage detected