�
Ϫ�f�@ � �B � d Z ddlZddlZddlZddlZddlZddlmZ ddlm Z ddl
mZmZ ddl
mZ ddlmZmZmZ ddlmZmZ dd lmZ dd
lmZ ddlmZ G d� d
e� Z G d� de� Z G d� de� Z G d� de� Z G d� de� Z eee� G d� d� � Z! G d� d� Z" ee� G d� d� � Z# ee� G d� d� � Z$ ee� G d� d� � Z% ee � G d � d!� � Z& G d"� d#e� Z' ee'� G d$� d%� � Z(y)&z�
This module defines L{ICredentials}, an interface for objects that represent
authentication credentials to provide, and also includes a number of useful
implementations of that interface.
� N)�hexlify)�md5)� Interface�implementer)�error)�calcHA1�calcHA2�calcResponse)�nativeString�
networkString)�deprecatedModuleAttribute)�secureRandom)�Versionc � � e Zd ZdZy)�ICredentialsz�
I check credentials.
Implementors I{must} specify the sub-interfaces of ICredentials
to which it conforms, using L{zope.interface.implementer}.
N��__name__�
__module__�__qualname__�__doc__� � �:/usr/lib/python3/dist-packages/twisted/cred/credentials.pyr r s � �r r c � � e Zd ZdZd� Zy)�IUsernameDigestHashz�
This credential is used when a CredentialChecker has access to the hash
of the username:realm:password as in an Apache .htdigest file.
c � � y)a-
@param digestHash: The hashed username:realm:password to check against.
@return: C{True} if the credentials represented by this object match
the given hash, C{False} if they do not, or a L{Deferred} which
will be called back with one of these values.
Nr )�
digestHashs r � checkHashzIUsernameDigestHash.checkHash- � � r N)r r r r r r r r r r ' |