Decrypts a string using Electron's
safeStorage API. Transforms the
input base64-encoded string to a buffer using Buffer.from(text, 'base64').
This method throws if the decryption mechanism is not available such as on Linux without a
supported package installed. See
safeStorage for more information.
Note that this encryption mechanism is not transferrable between computers. We recommend using
it with papi.storage methods to store data safely.
WARNING: The primary purpose of this service is to enable extensions to encrypt and decrypt data to be stored securely in local files. It is not intended to protect data passed over a network connection. Please note that using this service passes the unencrypted string between local processes using the PAPI WebSocket.
String to decrypt. This string should have been encrypted by
papi.dataProtection.encryptString
Decrypted string
Encrypts a string using Electron's
safeStorage API. Transforms the
returned buffer to a base64-encoded string using
buffer.toString('base64').
This method throws if the encryption mechanism is not available such as on Linux without a
supported package installed. See
safeStorage for more information.
Note that this encryption mechanism is not transferrable between computers. We recommend using
it with papi.storage methods to store data safely.
WARNING: The primary purpose of this service is to enable extensions to encrypt and decrypt data to be stored securely in local files. It is not intended to protect data passed over a network connection. Please note that using this service passes the unencrypted string between local processes using the PAPI WebSocket.
String to encrypt
Encrypted string. Use papi.dataProtection.decryptString to decrypt
Returns true if encryption is currently available. Returns false if the decryption
mechanism is not available such as on Linux without a supported package installed. See
Electron's safeStorage API for
more information.
WARNING: The primary purpose of this service is to enable extensions to encrypt and decrypt data to be stored securely in local files. It is not intended to protect data passed over a network connection. Please note that using this service passes the unencrypted string between local processes using the PAPI WebSocket.
true if encryption is currently available; false otherwise
Provides functions related to encrypting and decrypting strings like user data, secrets, etc.
Uses Electron's
safeStorageAPI.Note that these encryption mechanisms are not transferrable between computers. We recommend using them with
papi.storagemethods to store data safely.WARNING: The primary purpose of this service is to enable extensions to encrypt and decrypt data to be stored securely in local files. It is not intended to protect data passed over a network connection. Please note that using this service passes the unencrypted string between local processes using the PAPI WebSocket.