def hashes():
 t = []
 if ('md5' in dir(hashlib)):
  t = ['MD5']
 if ('md2' in dir(hashlib)):
  t += ['MD2']
 hashes = [('SHA-' + h[3:]) for h in dir(hashlib) if h.startswith('sha')]
 return (t + hashes)

def hashes ( ) : t = [ ] if ( 'md5' in dir ( hashlib ) ) : t = [ 'MD5' ] if ( 'md2' in dir ( hashlib ) ) : t += [ 'MD2' ] hashes = [ ( 'SHA-' + h [ 3 : ] ) for h in dir ( hashlib ) if h . startswith ( 'sha' ) ] return ( t + hashes )
return a list of available hashing algorithms .