Static method to be used inside other methods. Left rotates n by b. >>> SHA1Hash('').rotate(12,2) 48
(n, b)
| 51 | |
| 52 | @staticmethod |
| 53 | def rotate(n, b): |
| 54 | """ |
| 55 | Static method to be used inside other methods. Left rotates n by b. |
| 56 | >>> SHA1Hash('').rotate(12,2) |
| 57 | 48 |
| 58 | """ |
| 59 | return ((n << b) | (n >> (32 - b))) & 0xFFFFFFFF |
| 60 | |
| 61 | def padding(self): |
| 62 | """ |
no outgoing calls
no test coverage detected