Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Node native module to encrypt/decrypt data. On Windows, it uses DPAPI
function protectData(
userData: Uint8Array,
optionalEntropy: Uint8Array,
scope: "CurrentUser" | "LocalMachine"
): Uint8Array;
function unprotectData(
encryptedData: Uint8Array,
optionalEntropy: Uint8Array,
scope: "CurrentUser" | "LocalMachine"
): Uint8Array;
import * as dpapi from "node-dpapi";
const buffer = Buffer.from("Hello world", "utf-8");
const encrypted = dpapi.protectData(buffer, null, "CurrentUser");
const decrypted = dpapi.unprotectData(encrypted, null, "CurrentUser");
Q: Does this work on all platforms?
A: Currently it just works on Windows
This package originates from bradhugh/node-dpapi, but he did not publish it to npm. I have taken the liberty of publishing this package so it may be used as a dependency.
FAQs
Node native module to encrypt/decrypt data. On Windows, it uses DPAPI
The npm package win-dpapi receives a total of 4,439 weekly downloads. As such, win-dpapi popularity was classified as popular.
We found that win-dpapi demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.