MCPcopy
hub / github.com/dmarman/sha256algorithm / rotateRight

Function rotateRight

src/classes/utils.js:104–112  ·  view source on GitHub ↗
(value, r)

Source from the content-addressed store, hash-verified

102}
103
104export function rotateRight(value, r) { // https://github.com/dfrankland/bitwise-rotation/blob/master/src/index.js
105 const bitWidth = 32;
106 const rotation = r & (bitWidth - 1)
107 const bitMask = (2 ** bitWidth) - 1
108 return (
109 (value >>> rotation) |
110 ((value << (bitWidth - rotation)) & bitMask)
111 ); // Change from signed to unsigned
112}
113
114export function ordinal(i) {
115 let j = i % 10,

Callers 9

shaSteppedFunction · 0.90
Temp1.jsFile · 0.90
Sigma.jsFile · 0.90
SigmaUpper0.jsFile · 0.90
Temp2.jsFile · 0.90
SigmaUpper1.jsFile · 0.90
SigmaUpper.jsFile · 0.90
WordResult.jsFile · 0.90
UpdateLetters.jsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected