???<!-- GIF89;a -->
123123123123
.....................................................................................................................................???<!-- GIF89;a -->
123123123123
.....................................................................................................................................3
¢báWÉ  ã               @   s8   d Z ddlmZmZ ddlZddlZdd„ Zdd„ ZdS )zA place to store TSIG keys.é    )Úmaybe_decodeÚmaybe_encodeNc             C   s<   i }x2| D ]*}t jj|ƒ}tjt| | ƒƒ}|||< q
W |S )z¢Convert a dictionary containing (textual DNS name, base64 secret) pairs
    into a binary keyring which has (dns.name.Name, binary secret) pairs.
    @rtype: dict)ÚdnsÚnameÚ	from_textÚbase64Zdecodestringr   )ÚtextringÚkeyringÚkeytextÚkeynameÚsecret© r   ú!/usr/lib/python3.6/tsigkeyring.pyr      s    
r   c             C   s<   i }x2| D ]*}t |jƒ ƒ}t tj| | ƒƒ}|||< q
W |S )z Convert a dictionary containing (dns.name.Name, binary secret) pairs
    into a text keyring which has (textual DNS name, base64 secret) pairs.
    @rtype: dict)r   Úto_textr   Zencodestring)r	   r   r   r
   r   r   r   r   r   &   s    
r   )	Ú__doc__Zdns._compatr   r   r   Zdns.namer   r   r   r   r   r   r   Ú<module>   s
   