def _password_digest(username, password):
if not isinstance(password, basestring):<EOL><INDENT>raise TypeError("<STR_LIT>")<EOL><DEDENT>if not isinstance(username, basestring):<EOL><INDENT>raise TypeError("<STR_LIT>")<EOL><DEDENT>md5hash = hashlib.md5()<EOL>md5hash.update("<STR_LIT>" % (username.encode('<STR_LIT:utf-8>'),<EOL>password.encode('<STR_LIT:utf-8>')))<EOL>return unicode(md5hash.hexdigest())<EOL>
Get a password digest to use for authentication.