fI dZddlZddlmZmZddlZddlZdeeefdeejjejjffdZ deejjefdeeeffdZy) zA place to store TSIG keys.N)AnyDicttextringreturncFi}|jD]\}}tjj|}t |t r.tj j||j||<c|\}}tj j|||||<|S)a7Convert a dictionary containing (textual DNS name, base64 secret) pairs into a binary keyring which has (dns.name.Name, bytes) pairs, or a dictionary containing (textual DNS name, (algorithm, base64 secret)) pairs into a binary keyring which has (dns.name.Name, dns.tsig.Key) pairs. @rtype: dict) itemsdnsname from_text isinstancestrtsigKeysecret)rkeyringr valuekname algorithmrs X/var/lib/jenkins/workspace/mettalog/venv/lib/python3.12/site-packages/dns/tsigkeyring.pyr r sG~~' e""4( eS ! XX\\%7>>GEN"' Y XX\\%CGEN ( NrcZi}d}|jD]\}}|j}t|tr ||||<2t|jtr||j}nt |j}|j j|f||<|S)a;Convert a dictionary containing (dns.name.Name, dns.tsig.Key) pairs into a text keyring which has (textual DNS name, (textual algorithm, base64 secret)) pairs, or a dictionary containing (dns.name.Name, bytes) pairs into a text keyring which has (textual DNS name, base64 secret) pairs. @rtype: dictcdtj|jjS)N)base64 encodebytesdecoderstrip)rs r b64encodezto_text..b64encode6s%!!&)00299;;r)rto_textr bytesrr r)rrrr keytname text_secrets rrr-sH<]]_ c  c5 !'nHUO#**e,' 3 !#**o "}}446 DHUO% Or)__doc__rtypingrrdns.namer dns.tsigr r Namerrr rrrr)sx$" S#X4 sxx||0K+L$T#((--,-$sCx.r