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 🙏

© 2024 – Pkg Stats / Ryan Hefner

hydrocrypto

v1.0.1

Published

![NPM](https://img.shields.io/npm/v/hydrocrypto?style=for-the-badge) ![Github Stars](https://img.shields.io/github/stars/Unknown-user-dev/HydroCrypto?style=for-the-badge) ![GitHub issues](https://img.shields.io/github/issues-raw/Unknown-user-dev/HydroCr

Downloads

8

Readme

🌐 Hydro Crypto

NPM Github Stars GitHub issues

📝 Features

Crypto

  • [x] Generate RSA key pair
  • [x] Encrypt and Decrypt data
  • [x] Generate encryption key
  • [x] Sign data
  • [x] Verify Signature

Preview

Encryption key generated : 89c5b1f98e8462723e49a06f593b3969472a01c39f93cb20a6040986996a44dd
Key figures : 2aed63c860353e2829755403d71daf81
Deciphered data : Hello World!
Digital signature : a08ecc6253eaa7f91f805a713b7325b666c84b148520f941d911f9e24942f74127a15cf041de1f0f6fa4a06fcfdde4ad72d3fe578936f40435a1c6d6aefa9f46b1727c30e003ba82e03e32e915ea969236872ba07506142584cee386e0d1d6d2587cc1c94d3da9cb
3a0f1c89853f5f2577a1994d2f3a3897ad2f41d663820a51dd723e5696065a532b6ae75c4e02940fc3a454bb748809d9c61eff5452fd0dc79a548e39d42596aa39049a75caa71f415ccddcdaa751a57812675393cdd7b5523f0cc13a5492ddbe40d06a1695add8ef0af01071eac0bc2374e7d8654e6047435da848f4c0fbe75ff3c16bd5b4b8d89b1395172c76d1d9425c536c012bc8bc34
The signature is valid ? true

Stuff I used to make this

⚙️ How to use

  1. Fork this repository
  2. Import module
const hydrocrypto = require('hydrocrypto');
const fs = require('fs')
  1. All fonc :
// Generate RSA key pair and save to files
cryptoUtils.generateRSAKeyPair();

// Encrypt and decrypt data
const plaintext = 'Hello World!';

// Generate encryption key
const encryptionKey = cryptoUtils.generateEncryptionKey();
console.log('Encryption key generated :', encryptionKey);

// Encrypt data
const encryptedData = cryptoUtils.encryptData(plaintext, encryptionKey);
console.log('Key figures :', encryptedData);

// Decrypt data
const decryptedData = cryptoUtils.decryptData(encryptedData, encryptionKey);
console.log('Deciphered data :', decryptedData);

// Sign and verify data
const keypub = fs.readFileSync('public-key.pub', 'utf-8');
const keypriv = fs.readFileSync('private-key.pem', 'utf-8');

// Sign data
const signature = cryptoUtils.signData(plaintext, keypriv);
console.log('Digital signature :', signature);

// Verify signature
const isSignatureValid = cryptoUtils.verifySignature(plaintext, signature, keypub);
console.log('The signature is valid ?', isSignatureValid);