MCPcopy Create free account
hub / github.com/TheAlgorithms/Go / leftRotate

Function leftRotate

hashing/sha1/sha1.go:38–40  ·  view source on GitHub ↗

leftRotate rotates x left by n bits

(x, n uint32)

Source from the content-addressed store, hash-verified

36
37// leftRotate rotates x left by n bits
38func leftRotate(x, n uint32) uint32 {
39 return (x << n) | (x >> (32 - n))
40}
41
42// Hash computes the SHA-1 hash of the input message
43func Hash(message []byte) [20]byte {

Callers 1

HashFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected