def fix_checksums(self, buff):
import zlib<EOL>import hashlib<EOL>signature = hashlib.sha1(buff[<NUM_LIT:32>:]).digest()<EOL>buff = buff[:<NUM_LIT:12>] + signature + buff[<NUM_LIT:32>:]<EOL>checksum = zlib.adler32(buff[<NUM_LIT:12>:])<EOL>buff = buff[:<NUM_LIT:8>] + pack("<STR_LIT>", checksum) + buff[<NUM_LIT:12>:]<EOL>debug("<STR_LIT>" % repr(signature))<EOL>debug("<STR_LIT>" % checksum)<EOL>return buff<EOL>
Fix a dex format buffer by setting all checksums

:rtype: string