Right rotate a given unsigned number by a certain amount of rotations
(self, value: int, rotations: int)
| 188 | self.hash = "".join([hex(value)[2:].zfill(8) for value in self.hashes]) |
| 189 | |
| 190 | def ror(self, value: int, rotations: int) -> int: |
| 191 | """ |
| 192 | Right rotate a given unsigned number by a certain amount of rotations |
| 193 | """ |
| 194 | return 0xFFFFFFFF & (value << (32 - rotations)) | (value >> rotations) |
| 195 | |
| 196 | |
| 197 | class SHA256HashTest(unittest.TestCase): |