backsplash-app
Version:
An AI powered wallpaper app.
16 lines (14 loc) • 405 B
text/typescript
import { app } from "electron";
import { createHash } from "crypto";
/**
* Gets a unique machine ID based on the userData path
*/
export function getMachineId(): string | null {
try {
const userDataPath = app.getPath("userData");
return createHash("sha256").update(userDataPath).digest("hex");
} catch (error) {
console.error("Error getting machine ID:", error);
return null;
}
}