
­­­­­­­­­­­­­­­­­­
<!DOCTYPE html>
<html>
3
bW                 @   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 )zConvert 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 )zConvert 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
   