Sign in

encrypt

encrypt(data: string, secret: string): Promise<string>

Encrypts a given string using a secret with AES-GCM.

Parameters

ParameterTypeDescription
datastringThe plaintext data to encrypt.
secretstringThe secret used to derive the encryption key.

Returns

Promise<string>

Base64-encoded ciphertext.

© 2024 MonoCloud. All rights reserved.