Add note about keychain
This commit is contained in:
parent
939b228a0d
commit
6efbaacdd1
2 changed files with 9 additions and 1 deletions
|
@ -72,7 +72,6 @@ export const openLogDirectory = () => openDirectory(logDirectoryPath());
|
|||
* - macOS: ~/Library/Logs/Electron/ente.log (dev)
|
||||
*
|
||||
* https://www.electronjs.org/docs/latest/api/app
|
||||
*
|
||||
*/
|
||||
const logDirectoryPath = () => app.getPath("logs");
|
||||
|
||||
|
|
|
@ -14,6 +14,15 @@ export const clearStores = () => {
|
|||
watchStore.clear();
|
||||
};
|
||||
|
||||
/**
|
||||
* [Note: Safe storage keys]
|
||||
*
|
||||
* On macOS, `safeStorage` stores our data under a Keychain entry named
|
||||
* "<app-name> Safe Storage". Which resolves to:
|
||||
*
|
||||
* - Electron Safe Storage (dev)
|
||||
* - ente Safe Storage (prod)
|
||||
*/
|
||||
export const saveEncryptionKey = (encryptionKey: string) => {
|
||||
const encryptedKey = safeStorage.encryptString(encryptionKey);
|
||||
const b64EncryptedKey = Buffer.from(encryptedKey).toString("base64");
|
||||
|
|
Loading…
Add table
Reference in a new issue