%PDF- %PDF-
| Direktori : /usr/lib/python3.6/site-packages/pyzor/__pycache__/ |
| Current File : //usr/lib/python3.6/site-packages/pyzor/__pycache__/account.cpython-36.pyc |
3
�2�^� � @ sj d Z ddlZddlZddlZejfdd�Zejfdd�Zdd� ZG d d
� d
e�Z dd� Z
e ejdd
�ZdS )z�A collection of utilities that facilitate working with Pyzor accounts.
Note that accounts are not necessary (on the client or server), as an
"anonymous" account always exists.� Nc C sN |j � j� jd�}|� }|j||�j� � |jd|| f jd�� |j� j� S )z�Converts the key, timestamp (epoch seconds), and msg into a digest.
lower(H(H(M) + ':' T + ':' + K))
M is message
T is integer epoch timestamp
K is hashed_key
H is the hash function (currently SHA1)
�utf8z:%d:%s)Z as_string�strip�encode�update�digest� hexdigest�lower)Z
hashed_key� timestamp�msg�hash_r � r �/usr/lib/python3.6/account.py�sign_msg s
r c C s&