Skip to content

Graphorin API reference v0.1.0


Graphorin API reference / @graphorin/security / / encodeBase62Bytes

Function: encodeBase62Bytes()

ts
function encodeBase62Bytes(bytes, width): string;

Defined in: packages/security/src/auth/token-format.ts:191

Encode a byte buffer as base62 with a fixed-length output. The routine treats the bytes as a big-endian unbounded integer and left-pads to width so that any 32-byte input yields exactly 43 base62 characters.

Parameters

ParameterType
bytesUint8Array
widthnumber

Returns

string

Stable