openvibe-sdk/locker/server

Generated at from openvibe-contracts v0.419.0 and openvibe-sdk v0.161.0.

From types/locker-server.d.ts (both). Declarations are shown verbatim.

interface EnvelopeInfo

What an envelope holds, as far as a service may know.

export interface EnvelopeInfo {
    /** Whether the header and the size pass every check. */
    valid: boolean;
    /** What is wrong, in words, when something is. */
    errors: string[];
    /** The header itself. It holds no key material, only wrapped keys. */
    header: LockerHeader | null;
    headerLength: number;
    chunkOffset: number;
    lock: LockKind | undefined;
    /** The size of the padded plaintext: a whole number of chunks. */
    paddedSize: number | undefined;
    chunkCount: number | null;
    /** The bytes the envelope must have, if its own header is true. */
    expectedBytes: number | null;
}

export export function inspectEnvelope(bytes: Uint8Array, options?:

Reads an envelope's header and checks its shape and its size. Nothing is decrypted.

export function inspectEnvelope(bytes: Uint8Array, options?: { maxHeaderBytes?: number }): EnvelopeInfo;

export export function inspectEnvelopePrefix(prefix: Uint8Array, to

Check a bounded header prefix against the actual complete stored ciphertext size.

export function inspectEnvelopePrefix(prefix: Uint8Array, totalBytes: number, options?: { maxHeaderBytes?: number }): EnvelopeInfo;

export export function checkHeader(header: unknown): string[];

The header's shape: what it says, and whether the slots match the lock it names.

export function checkHeader(header: unknown): string[];

export export function peopleSlotOk(slot: unknown): boolean;

One people slot's shape: whose it is, which key it names, and the bytes it must hold.

export function peopleSlotOk(slot: unknown): boolean;