import { ipcRenderer } from "electron"; /** * Decrypts a string using the Electron IPC API. * @param {string} data - The encrypted content to decrypt. * @returns {Promise} The decrypted content. */ export const decrypt = async (userId: string, data: string): Promise => { try { const result = await ipcRenderer.invoke("decrypt", { encryptedData: data, userId}); return result; } catch(error) { console.error("Error decrypting data:", error); throw error; } };