(self, tab)
return self.c
Computes real hash
Computes real hash
Computes real hash
def compute_hash(self, tab):
        """
        Computes real hash
        """
        length = len(tab)
        cur = 0
        while length >= 12:
            self.a += (
                abs(tab[cur + 0])
                + (tab[cur + 1] << 8)
                + (tab[cur + 2] << 16)
                + (tab[cur + 3] << 24)
            )
            self.b += (
                tab[cur + 4]
                + (tab[cur + 5] << 8)
                + (tab[cur + 6] << 16)
                + (tab[cur + 7] << 24)
            )
            self.c += (
                tab[cur + 8]
                + (tab[cur + 9] << 8)
                + (tab[cur + 10] << 16)
                + (tab[cur + 11] << 24)
            )

            self.a, self.b, self.c = self.mix(self.a, self.b, self.c)

            cur += 12
            length -= 12

        self.c += len(tab)

        if length == 11:
            self.c += tab[cur + 10] << 24
        if length == 10:
            self.c += tab[9] << 16
        if length == 9:
            self.c += tab[8] << 8
        if length == 8:
            self.b += tab[7] << 24
        if length == 7:
            self.b += tab[6] << 16
        if length == 6:
            self.b += tab[5] << 8
        if length == 5:
            self.b += tab[4]
        if length == 4:
            self.a += tab[3] << 24
        if length == 3:
            self.a += tab[2] << 16
        if length == 2:
            self.a += tab[1] << 8
        if length == 1:
            self.a += tab[0]

        self.a, self.b, self.c = self.mix(self.a, self.b, self.c)

        return self.c
def compute_hash ( self , tab ) : length = len ( tab ) cur = 0 while length >= 12 : self . a += ( abs ( tab [ cur + 0 ] ) + ( tab [ cur + 1 ] << 8 ) + ( tab [ cur + 2 ] << 16 ) + ( tab [ cur + 3 ] << 24 ) ) self . b += ( tab [ cur + 4 ] + ( tab [ cur + 5 ] << 8 ) + ( tab [ cur + 6 ] << 16 ) + ( tab [ cur + 7 ] << 24 ) ) self . c += ( tab [ cur + 8 ] + ( tab [ cur + 9 ] << 8 ) + ( tab [ cur + 10 ] << 16 ) + ( tab [ cur + 11 ] << 24 ) ) self . a , self . b , self . c = self . mix ( self . a , self . b , self . c ) cur += 12 length -= 12 self . c += len ( tab ) if length == 11 : self . c += tab [ cur + 10 ] << 24 if length == 10 : self . c += tab [ 9 ] << 16 if length == 9 : self . c += tab [ 8 ] << 8 if length == 8 : self . b += tab [ 7 ] << 24 if length == 7 : self . b += tab [ 6 ] << 16 if length == 6 : self . b += tab [ 5 ] << 8 if length == 5 : self . b += tab [ 4 ] if length == 4 : self . a += tab [ 3 ] << 24 if length == 3 : self . a += tab [ 2 ] << 16 if length == 2 : self . a += tab [ 1 ] << 8 if length == 1 : self . a += tab [ 0 ] self . a , self . b , self . c = self . mix ( self . a , self . b , self . c ) return self . c