MCPcopy Index your code
hub / github.com/dmarman/sha256algorithm / calculateK

Function calculateK

src/classes/utils.js:68–74  ·  view source on GitHub ↗
(L)

Source from the content-addressed store, hash-verified

66}
67
68export function calculateK(L) {
69 let K = 0;
70 while (!isMultipleOf512(L + 1 + K + 64)) {
71 K++
72 }
73 return K
74}
75
76export function return64Bit(number) {
77 return number.padStart(64, '0')

Callers 2

paddingFunction · 0.70
paddingExplainedFunction · 0.70

Calls 1

isMultipleOf512Function · 0.70

Tested by

no test coverage detected