Skip to content

ElectronSafeStorage.encryptString method

ElectronSafeStorage › encryptString

Unofficial

Encrypts a string using OS-level cryptography.

This function will throw an error if encryption fails.

Signature:

encryptString(plainText: string): Buffer

Parameters:

Parameter Type Description
plainText string The string to encrypt.

Returns: BufferA buffer of bytes representing the encrypted string.