MCPcopy
hub / github.com/panva/jose / concat

Function concat

src/lib/buffer_utils.ts:6–15  ·  view source on GitHub ↗
(...buffers: Uint8Array[])

Source from the content-addressed store, hash-verified

4const MAX_INT32 = 2 ** 32
5
6export function concat(...buffers: Uint8Array[]): Uint8Array {
7 const size = buffers.reduce((acc, { length }) => acc + length, 0)
8 const buf = new Uint8Array(size)
9 let i = 0
10 for (const buffer of buffers) {
11 buf.set(buffer, i)
12 i += buffer.length
13 }
14 return buf
15}
16
17function writeUInt32BE(buf: Uint8Array, value: number, offset?: number) {
18 if (value < 0 || value >= MAX_INT32) {

Callers 12

flattenedDecryptFunction · 0.85
encryptMethod · 0.85
cbcEncryptFunction · 0.85
cbcDecryptFunction · 0.85
gcmDecryptFunction · 0.85
concatSaltFunction · 0.85
lengthAndInputFunction · 0.85
deriveKeyFunction · 0.85
compressFunction · 0.85
decompressFunction · 0.85
flattenedVerifyFunction · 0.85
signMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…