1.8.9 • Published 2 months ago

malfapi v1.8.9

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

node-dpapi

Node native module to encrypt/decrypt data. On Windows, it uses DPAPI

API:

function protectData(
    userData: Uint8Array,
    optionalEntropy: Uint8Array,
    scope: "CurrentUser" | "LocalMachine"
): Uint8Array;

function unprotectData(
    encryptedData: Uint8Array,
    optionalEntropy: Uint8Array,
    scope: "CurrentUser" | "LocalMachine"
): Uint8Array;

Example:

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

FAQ:

Q: Does this work on all platforms?

A: Currently it just works on Windows

1.8.9

2 months ago

1.8.8

2 months ago

1.8.7

2 months ago

1.8.6

2 months ago

1.8.5

4 months ago