MCPcopy Create free account
hub / github.com/subbarayudu-j/TheAlgorithms-Python / rotate

Method rotate

hashes/sha1.py:47–51  ·  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

45
46 @staticmethod
47 def rotate(n, b):
48 """
49 Static method to be used inside other methods. Left rotates n by b.
50 """
51 return ((n << b) | (n >> (32 - b))) & 0xffffffff
52
53 def padding(self):
54 """

Callers 2

expand_blockMethod · 0.95
final_hashMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected