Node Addon for CryptProtectData/CryptUnprotectData of Win32 API to encrypt/decrypt data
"Typically, only a user with the same logon credential as the user who encrypted the data can decrypt the data. In addition, the encryption and decryption usually must be done on the same computer" CryptProtectData Win32 documentation
By combining with an additional password this could be a powerful tool to store passwords, api keys or any secret securely
npm install win-protect
const wp = require("win-protect");
const input = Buffer.from("secret");
const encrypted = wp.encrypt(input);
const decrypted = wp.decrypt(encrypted);
const wp = require("win-protect");
const password = Buffer.from("password123");
const input = Buffer.from("secret");
const encrypted = wp.encrypt(input, password);
const decrypted = wp.decrypt(encrypted, password);