
Security News
Astral Launches pyx: A Python-Native Package Registry
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
@primno/dpapi
Advanced tools
Pre-built version of DPAPI (Data Protection API of Windows). Encrypt and decrypt data.
Native module to encrypt/decrypt data on Windows with DPAPI.
This native module is prebuilt for Node.JS running on Windows. It provides the x64 and the arm64 N-API modules for Windows.
This package indicates if the prebuilt module is supported on the current platform.
Based on the port to N-API made by Microsoft in @msal-node-extension from the work of Brad Hughes.
This package is part of the Primno framework.
Other similar packages require to build the native module on the target machine during the installation. This means that you must have Python and Visual C++ installed, production environment included.
This package is prebuilt, so you don't need to have build tools installed on the target machine.
The prebuilt module will be installed with the following command.
npm install @primno/dpapi
class Dpapi {
public protectData(
userData: Uint8Array,
optionalEntropy: Uint8Array | null,
scope: "CurrentUser" | "LocalMachine"
): Uint8Array;
public unprotectData(
encryptedData: Uint8Array,
optionalEntropy: Uint8Array | null,
scope: "CurrentUser" | "LocalMachine"
): Uint8Array;
}
const isPlatformSupported: boolean;
import { Dpapi, isPlatformSupported } from "@primno/dpapi";
if (isPlatformSupported) {
const buffer = Buffer.from("Hello world", "utf-8");
const encrypted = Dpapi.protectData(buffer, null, "CurrentUser");
const decrypted = Dpapi.unprotectData(encrypted, null, "CurrentUser");
}
else {
console.error("Platform not supported. Only Windows is supported (x64, ARM64)");
}
const { Dpapi, isPlatformSupported } = require("@primno/dpapi");
if (isPlatformSupported) {
const buffer = Buffer.from("Hello world", "utf-8");
const encrypted = Dpapi.protectData(buffer, null, "CurrentUser");
const decrypted = Dpapi.unprotectData(encrypted, null, "CurrentUser");
}
else {
console.error("Platform not supported. Only Windows is supported (x64, ARM64)");
}
FAQs
Pre-built version of DPAPI (Data Protection API of Windows). Encrypt and decrypt data.
The npm package @primno/dpapi receives a total of 529 weekly downloads. As such, @primno/dpapi popularity was classified as not popular.
We found that @primno/dpapi demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.
Security News
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.