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

Function onClockBack

src/App.js:169–184  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

167 }
168
169 function onClockBack() {
170 if(clock === 0) return;
171 if(clock <= lastClock()) setClock(clock - 1);
172 let value = input;
173 if(clock === 1) value = '';
174 let result = shaStepped(value, firstLoop(clock - 2), secondLoop(clock - 2), chunksLoop(clock));
175
176 setWView(result.w);
177 setResult(result.hash);
178 setLetters(result.letters);
179 setLettersBefore(result.lettersBefore);
180 setHs(result.hs);
181 setHsBefore(result.hsBefore);
182
183 ReactGA.event('onClockBack');
184 }
185
186 function firstLoop(clock) {
187 let step = clock%114; // 115

Callers

nothing calls this directly

Calls 5

lastClockFunction · 0.85
shaSteppedFunction · 0.85
firstLoopFunction · 0.85
secondLoopFunction · 0.85
chunksLoopFunction · 0.85

Tested by

no test coverage detected