#NEWLINE# def from_text( cls , rdclass , rdtype , tok , origin = None , relativize = True ) : #NEWLINE# #INDENT# key_tag = tok . get_uint16 ( ) #NEWLINE# algorithm = tok . get_uint8 ( ) #NEWLINE# digest_type = tok . get_uint8 ( ) #NEWLINE# chunks = [ ] #NEWLINE# while 1 : #NEWLINE# #INDENT# t = tok . get ( ) . unescape ( ) #NEWLINE# if t . is_eol_or_eof ( ) : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# if ( not t . is_identifier ( ) ) : #NEWLINE# #INDENT# raise dns . exception . SyntaxError #NEWLINE# #UNINDENT# chunks . append ( t . value ) #NEWLINE# #UNINDENT# digest = '' . join ( chunks ) #NEWLINE# digest = digest . decode ( 'hex_codec' ) #NEWLINE# return cls ( rdclass , rdtype , key_tag , algorithm , digest_type , digest )