SafeStorage

external interface SafeStorage(source)

Functions

Link copied to clipboard
abstract external fun decryptStringAsync(encrypted: Buffer<*>): Promise<DecryptStringAsyncReturnValue>

Resolve with an object containing the following:

Link copied to clipboard
abstract external fun encryptStringAsync(plainText: String): Promise<Buffer<*>>

An array of bytes representing the encrypted string.

Link copied to clipboard

User friendly name of the password manager selected on Linux.

Link copied to clipboard
abstract external fun isAsyncEncryptionAvailable(): Promise<Boolean>

Resolves with whether encryption is available for asynchronous safeStorage operations.

Link copied to clipboard
abstract external fun setUsePlainTextEncryption(usePlainText: Boolean)

This function on Linux will force the module to use an in memory password for creating symmetric key that is used for encrypt/decrypt functions when a valid OS password manager cannot be determined for the current active desktop environment. This function is a no-op on Windows and MacOS.