Pads the input message with zeros so that padded_data has 64 bytes or 512 bits
(self)
| 51 | return ((n << b) | (n >> (32 - b))) & 0xffffffff |
| 52 | |
| 53 | def padding(self): |
| 54 | """ |
| 55 | Pads the input message with zeros so that padded_data has 64 bytes or 512 bits |
| 56 | """ |
| 57 | padding = b'\x80' + b'\x00'*(63 - (len(self.data) + 8) % 64) |
| 58 | padded_data = self.data + padding + struct.pack('>Q', 8 * len(self.data)) |
| 59 | return padded_data |
| 60 | |
| 61 | def split_blocks(self): |
| 62 | """ |