#NEWLINE# def _get_digest( self , info ) : #NEWLINE# #INDENT# "\n        Get a digest from a dictionary by looking at keys of the form\n        'algo_digest'.\n\n        Returns a 2-tuple (algo, digest) if found, else None. Currently\n        looks only for SHA256, then MD5.\n        " #NEWLINE# result = None #NEWLINE# for algo in ( 'sha256' , 'md5' ) : #NEWLINE# #INDENT# key = ( '%s_digest' % algo ) #NEWLINE# if ( key in info ) : #NEWLINE# #INDENT# result = ( algo , info [ key ] ) #NEWLINE# break #NEWLINE# #UNINDENT# #UNINDENT# return result