Faster md5/1-way encryption?

Paul Rubin phr-n2002a at nightsong.com
Thu Apr 25 07:44:28 EDT 2002


Alexander Skwar <ASkwar at DigitalProjects.com> writes:
> > 	myResults = string.join( myResults, os.linesep )
> 
> Yes, that makes sense.  Thanks!
> 
> > Which would save you creating and destroying huge numbers of (at the end 
> > of processing) very large strings.  If you can avoid that last step 
> 
> Yes, I also noticed, that it gets slower and slower over the time.

I don't understand this.  Do you really want to accumulate a string
containing 100,000 hash results (1.6 megabytes of hashes)?  Or do you
want to hash all the lines together and get one result?

If you want to hash everything together, use

  d = md5.new()
  ...
     (in loop):
     d.update(zeile)

  result = d.digest()



More information about the Python-list mailing list