#NEWLINE# def to_text( keyring ) : #NEWLINE# #INDENT# 'Convert a dictionary containing (dns.name.Name, binary secret) pairs\n    into a text keyring which has (textual DNS name, base64 secret) pairs.\n    @rtype: dict' #NEWLINE# textring = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for keyname in keyring : #NEWLINE# #INDENT# keytext = dns . name . to_text ( keyname ) #NEWLINE# secret = base64 . encodestring ( keyring [ keyname ] ) #NEWLINE# textring [ keytext ] = secret #NEWLINE# #UNINDENT# return textring