Skip to content
rw3iss Auth

Crypto

Crypto

Defined in: auth-client/src/core/types.ts:274

Cryptographic primitives. The browser default is WebCrypto; an SSR adapter can plug in Node’s built-in webcrypto via globalThis.

Methods

randomBytes()

randomBytes(length): Uint8Array

Defined in: auth-client/src/core/types.ts:276

Returns length cryptographically-secure random bytes.

Parameters

length

number

Returns

Uint8Array


sha256()

sha256(input): Promise<Uint8Array<ArrayBufferLike>>

Defined in: auth-client/src/core/types.ts:278

Computes SHA-256(input). Returns the raw 32-byte digest.

Parameters

input

Uint8Array

Returns

Promise<Uint8Array<ArrayBufferLike>>