File: //usr/lib/python3/dist-packages/twisted/cred/test/__pycache__/test_digestauth.cpython-38.pyc
U
W[!_ � @ s� d Z ddlmZmZ ddlZddlmZ ddlmZm Z ddl
mZ ddlm
Z
ddlmZ dd lmZ dd
lmZmZmZ ddlmZmZ ddlmZ d
d� ZG dd� de�ZG dd� de
�ZdS )z[
Tests for L{twisted.cred._digest} and the associated bits in
L{twisted.cred.credentials}.
� )�division�absolute_importN)�hexlify)�md5�sha1)�verifyObject)�TestCase)�IPv4Address)�LoginFailed)�calcHA1�calcHA2�IUsernameDigestHash)�calcResponse�DigestCredentialFactory)�
networkStringc C s t �| ��� S )N)�base64� b64encode�strip)�s� r �C/usr/lib/python3/dist-packages/twisted/cred/test/test_digestauth.pyr s r c s0 e Zd ZdZ� fdd�Zdd� Zdd� Z� ZS )�FakeDigestCredentialFactoryz\
A Fake Digest Credential Factory that generates a predictable
nonce and opaque
c s t t| �j||� d| _d S )N� 0)�superr �__init__�
privateKey)�self�args�kwargs�� __class__r r r "