📜  如何使用 keytar 电子 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:56.083000             🧑  作者: Mango

代码示例1
const keytar = require('keytar');

keytar.setPassword('KeytarTest', 'AccountName', 'secret');

const secret = keytar.getPassword('KeytarTest', 'AccountName');
secret.then((result) => {
    console.log("result: "+ result); // result will be 'secret'
});