Takes a bytestring-block of length 64, unpacks it to a list of integers and returns a list of 80 integers pafter some bit operations
(self, block)
| 44 | |
| 45 | # @staticmethod |
| 46 | def expand_block(self, block): |
| 47 | """ |
| 48 | Takes a bytestring-block of length 64, unpacks it to a list of integers and returns a |
| 49 | list of 80 integers pafter some bit operations |
| 50 | """ |
| 51 | w = list(struct.unpack(">16L", block)) + [0] * 64 |
| 52 | for i in range(16, 80): |
| 53 | w[i] = self.rotate((w[i - 3] ^ w[i - 8] ^ w[i - 14] ^ w[i - 16]), 1) |
| 54 | return w |
| 55 | |
| 56 | def final_hash(self): |
| 57 | """ |