Sign in

encryptSession

encryptSession(session: MonoCloudSession, secret: string, ttl?: number): Promise<string>

Encrypts a MonoCloud session object with a secret and optional time-to-live (TTL).

Parameters

ParameterTypeDescription
sessionMonoCloudSessionThe session object to encrypt.
secretstringThe secret used for encryption.
ttl?numberOptional time-to-live in seconds, after which the session expires.

Returns

Promise<string>

Encrypted session string.

© 2024 MonoCloud. All rights reserved.