diff options
author | siddharth <s@ricketyspace.net> | 2022-03-05 13:03:53 -0500 |
---|---|---|
committer | siddharth <s@ricketyspace.net> | 2022-03-05 13:03:53 -0500 |
commit | a43f1d60b697bf4e6d96f77e24ba8095dc1bd42a (patch) | |
tree | 74808d845049deac3547a48c1b3e18e72574196b /lib/hash.go | |
parent | d9c9edb96c2cd6e784a073894d65a843681006aa (diff) |
lib: add shaStr
Diffstat (limited to 'lib/hash.go')
-rw-r--r-- | lib/hash.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/hash.go b/lib/hash.go index 8c8aeef..b636e17 100644 --- a/lib/hash.go +++ b/lib/hash.go @@ -21,3 +21,8 @@ func shaRotr(x uint32, n uint) uint32 { func shaRotl(x uint32, n uint) uint32 { return (x << n) | (x >> (32 - n)) } + +// Right Shift +func shaShr(x uint32, n uint) uint32 { + return x >> n +} |