win-protect
v1.0.0
Published
Node Addon for CryptProtectData/CryptUnprotectData of Win32 API to encrypt/decrypt data
Downloads
17
Maintainers
Readme
win-protect
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 powerfull tool to store passwords, api keys or any secret securely
Installation
npm install win-protect
Examples
Encrypting data
const wp = require("win-protect");
const input = Buffer.from("secret");
const encrypted = wp.encrypt(input);
const decrypted = wp.decrypt(encrypted);
Encrypting data with additional password
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);