MCPcopy Create free account
hub / github.com/PaperDebugger/paperdebugger / wordsToBytes

Function wordsToBytes

webapp/_webapp/src/libs/helpers.ts:100–104  ·  view source on GitHub ↗
(words: number[])

Source from the content-addressed store, hash-verified

98
99// Convert big-endian 32-bit words to a byte array
100function wordsToBytes(words: number[]) {
101 const bytes = [];
102 for (let b = 0; b < words.length * 32; b += 8) bytes.push((words[b >>> 5] >>> (24 - (b % 32))) & 0xff);
103 return bytes;
104}
105
106export function generateSHA1Hash(inputString: string): string {
107 const encoder = new TextEncoder();

Callers 1

generateSHA1HashFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected