Skip to content

Node Addon for CryptProtectData/CryptUnprotectData

License

Notifications You must be signed in to change notification settings

hmenyus/win-protect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 powerful tool to store passwords, api keys or any secret securely

Donate

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);

About

Node Addon for CryptProtectData/CryptUnprotectData

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published