python crc32

import binascii

class Hash:
    def crc32(self,data):
        rs = binascii.crc32(data)
        #unsigned 32-bit CRC
        rs = rs % (1<<32)
        
        return rs

  

posted @ 2017-06-01 17:55  hao.ma  阅读(1245)  评论(0编辑  收藏  举报