Skip to content

Graphorin API reference v0.1.0


Graphorin API reference / @graphorin/sessions / / encryptBody

Function: encryptBody()

ts
function encryptBody(body, key): Uint8Array;

Defined in: packages/sessions/src/export/writer.ts:239

Convenience: AES-256-GCM encrypt a body buffer. The IV is generated fresh and prepended; the auth tag is appended. Output layout: [iv (12)][ciphertext][tag (16)].

Parameters

ParameterType
bodyUint8Array
keyUint8Array

Returns

Uint8Array

Stable