Dagon
Dagon copied to clipboard
MD2 algorithm takes up A LOT of CPU usage
MD2 algorithm takes up a ton of CPU, 100% on one of my cores on my machine image:
My assumption is that the issue is probably here:
def digest(self):
buf = pad(self.buf, self.digest_size)
c = list(self.c)
checksum(c, buf)
#print "*** checksum after padding = ", hexstr(c)
d = list(self.d)
digest(d, buf)
digest(d, c)
return d[0:16]
There's a lot of recursion here, so I'm going to look into making the MD2 algorithm much faster.