
Research
/Security News
Shai Hulud Strikes Again (v2)
Another wave of Shai-Hulud campaign has hit npm with more than 500 packages and 700+ versions affected.
@favware/crypto
Advanced tools
This package is a full rework of the now deprecated csprng-64.
crypto.randomBytes(). Numbers can be of any magnitude and in any base from 2 to 64.yarn add @favware/crypto
# npm install @favware/crypto
Call the function passing the number of required bits, and the radix of the output.
const { crypto } = require('@favware/crypto');
// import crypto from '@favware/crypto';
// Takes a bit length and base parameter
// base examples are base64 or base32
crypto(160, 64);
// You can also import the predefined Radix's so you can be sure you're using a supported radix
const { Radix } = require('@favware/crypto');
// import Radix from '@favware/crypto'
crypto(160, Radix.base64);
For the full API documentation please refer to the TypeDoc generated documentation.
Favware projects are and always will be open source, even if we don't get donations. That being said, we know there are amazing people who may still want to donate just to show their appreciation. Thank you very much in advance!
We accept donations through Open Collective, Ko-fi, Paypal, Patreon and GitHub Sponsorships. You can use the buttons below to donate through your method of choice.
| Donate With | Address |
|---|---|
| GitHub Sponsors | Click Here |
| Ko-fi | Click Here |
| Patreon | Click Here |
| PayPal | Click Here |
Thanks goes to these wonderful people (emoji key):
Jeroen Claassens 💻 🚇 📆 📖 ⚠️ |
This project follows the all-contributors specification. Contributions of any kind welcome!
FAQs
Secure random numbers of any size in any base
We found that @favware/crypto 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.

Research
/Security News
Another wave of Shai-Hulud campaign has hit npm with more than 500 packages and 700+ versions affected.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.