MCPcopy
hub / github.com/angular/angular / stringToWords32

Function stringToWords32

packages/service-worker/cli/sha1.ts:114–123  ·  view source on GitHub ↗
(str: string, endian: Endian)

Source from the content-addressed store, hash-verified

112}
113
114function stringToWords32(str: string, endian: Endian): number[] {
115 const size = (str.length + 3) >>> 2;
116 const words32 = [];
117
118 for (let i = 0; i < size; i++) {
119 words32[i] = wordAt(str, i * 4, endian);
120 }
121
122 return words32;
123}
124
125function arrayBufferToWords32(buffer: ArrayBuffer, endian: Endian): number[] {
126 const size = (buffer.byteLength + 3) >>> 2;

Callers 1

sha1Function · 0.70

Calls 1

wordAtFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…