npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@hackthedev/dsync-sign

v1.0.10

Published

dSyncSign is an additional package that comes with a few helper functions that can enhance the plain dSync package. dSyncSign comes with the following features:

Downloads

239

Readme

dSyncSign

dSyncSign is an additional package that comes with a few helper functions that can enhance the plain dSync package. dSyncSign comes with the following features:

  • Creation of a private key file and public key
  • Ability to sign strings or json objects, or even nested objects inside a json object
  • Ability to verify signed strings/objects using a known public key
  • Ability to encrypt and decrypt data with a private key or password

Importing

You can import the package with the following line into your code and install it like below

import { dSyncSign } from "@hackthedev/dsync-sign";

const signer = new dSyncSign("./mykeys.json"); // optional path for private key file
npm i @hackthedev/dsync-sign

Signing & Verifying JSON Objects

You can also sign and very JSON objects pretty easily.

const obj = { hello: "world" };
await signer.signJson(obj);
console.log("Object with sig", obj);

const verified = await signer.verifyJson(obj, await signer.getPublicKey());
console.log("JSON valid?", verified);

Output:

Object with sig {
  hello: 'world',
  sig: 'W3tGrkWdCT62Zc7eJKM2Pr13CgsQc65diH4N5d0pGasyKEpWQVZG5wz6WhlKoJmYqE8O4OSIcm/WVCBtnZM66zpic0PAtuGaTKt224AO/zDWrQhuCDflvR29OHzeKcnHXNVS924PXK24dA2MiILTYlSbGLguIw0bfIWN1hDeVHYWu3VeDmOSBFUlkaviJzxV/lALRSBySIDd5SFFQQWfk0hLv0Hy8MMHzGQetrs9/l5mBLGU8iSrA85alXFN+OKz0Qo57zgPV5cBCl19LB/ZL0oR+GsQv171Jn04UO8hFUsyJJqI2VnPAw11LgPqwXqHUDuQwdCS7zvTyDmlM7+rvA=='
}
JSON valid? true

Verifying & Signing nested JSON Objects

Its also possible to sign nested or specific objects.

const obj = {
    hello: {
        world: "hi"
    },
    bye: {
        crazy: "indeed"
    }
};
await signer.signJson(obj.hello);
console.log("Object with sig", obj);

const verified = await signer.verifyJson(obj.hello, await signer.getPublicKey());
console.log("JSON valid?", verified);

Output:

Object with sig {
  hello: {
    world: 'hi',
    sig: 'qEsJ8O7HVohexEFpvjVljfvSXdPp93DHAcg1PiLxNA0TjE48FdHd11cS5vYJlLPmpPEG/80cqETsHwlCjTiOZI6xC90IxdGTKGttjv1gFYM5bOgQlgcLW83BtlWdC0PES3xU5nEUCiNfXNKSeUT8HJTEsggQ6c17WjMcunZENEWiRqCQNY3ZXzvrqGKrJ/mm9BrRsgaFZMRh5j0eUhT1eJ4pVp6fleTAYIumuagpwG41MR3CG57dImxCoeFAcCDMikJEQKBknmhaDsEa9UFHzl8+hTsroI30ktTK7kOPf4XKbkuNGX+lZZwZPlWkfh/sQLSD59psvJDVvEQTrX1/KQ=='
  },
  bye: { crazy: 'indeed' }
}
JSON valid? true

Encryption & Decryption using password

const secretMsg = "This is some secret text";

const envPwd = await signer.encrypt(secretMsg, "somepass1234");
console.log("Envelope (Password):", envPwd);

const decPwd = await signer.decrypt(envPwd, "somepass1234");
console.log("Decrypted (Password):", decPwd);

Output:

Envelope (Password): {
  method: 'password',
  salt: 'QxGLufg1lXn6boTVHme8+Q==',
  iv: 'yum57MIAZc0hUBLXPd7hxQ==',
  tag: 'jok95AmgKTj0okoLrFeL0A==',
  ciphertext: 'cDz+F+z8i9emqTO5COKOYfnYWxTB4spC'
}
Decrypted (Password): This is some secret text