Lines Matching full:hname
41 hName = sys.argv[1]
46 if hName in ('_md5', '_sha'):
47 exec 'import '+hName
48 exec 'creatorFunc = '+hName+'.new'
49 print "testing speed of old", hName, "legacy interface"
50 elif hName == '_hashlib' and len(sys.argv) > 3:
54 elif hName == '_hashlib' and len(sys.argv) == 3:
58 elif hasattr(hashlib, hName) and callable(getattr(hashlib, hName)):
59 creatorFunc = getattr(hashlib, hName)
60 print "testing speed of hashlib."+hName, getattr(hashlib, hName)
62 exec "creatorFunc = lambda x=hashlib.new : x(%r)" % hName
63 print "testing speed of hashlib.new(%r)" % hName
72 print " '_hashlib' 'hName' tests builtin _hashlib.new(shaFOO)"
73 print " 'hName' tests the hashlib.hName() implementation if it exists"
74 print " otherwise it uses hashlib.new(hName)."