MCPcopy Create free account
hub / github.com/geekcomputers/Python / rotate

Method rotate

sha1.py:23–27  ·  view source on GitHub ↗

Static method to be used inside other methods. Left rotates n by b.

(n, b)

Source from the content-addressed store, hash-verified

21
22 @staticmethod
23 def rotate(n, b):
24 """
25 Static method to be used inside other methods. Left rotates n by b.
26 """
27 return ((n << b) | (n >> (32 - b))) & 0xFFFFFFFF
28
29 def padding(self):
30 """

Callers 2

expand_blockMethod · 0.95
final_hashMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected