
Security News
The Next Open Source Security Race: Triage at Machine Speed
Claude Opus 4.6 has uncovered more than 500 open source vulnerabilities, raising new considerations for disclosure, triage, and patching at scale.
deca-random-bytes
Advanced tools
Cryptographically secure random byte and number generator with multiple encoding support
A comprehensive, cryptographically secure random byte and number generator with multiple encoding support. 🔐🚀
npm install deca-random-bytes
deca-random-bytes/
│
├── src/
│ └── index.ts # Main source file
│
├── dist/ # Compiled JavaScript files
│ └── index.js
│ └── index.d.ts # TypeScript declaration file
│
├── tests/
│ └── index.test.ts # Unit tests
│
├── package.json # Project configuration
├── tsconfig.json # TypeScript configuration
└── README.md # Project documentation
import { decaRandomBytes } from 'deca-random-bytes';
// Generate 16 random bytes in hex (default)
const hexToken = decaRandomBytes(16);
// Generate in different encodings
const base64Token = decaRandomBytes(16, 'base64');
const utf8Token = decaRandomBytes(16, 'utf8');
import { decaMultiRandomBytes } from 'deca-random-bytes';
const tokens = decaMultiRandomBytes({
apiToken: { bytes: 16, encoding: 'hex' },
userId: { bytes: 8, encoding: 'base64url' },
sessionKey: { bytes: 32, encoding: 'base64' }
});
console.log(tokens.apiToken); // Hex-encoded random bytes
console.log(tokens.userId); // Base64URL-encoded random bytes
console.log(tokens.sessionKey); // Base64-encoded random bytes
import { decaRandomInt } from 'deca-random-bytes';
// Generate a random integer between 1 and 100 (inclusive)
const randomNumber = decaRandomInt(1, 100);
console.log(randomNumber);
hex: Hexadecimal encoding 🔢base64: Base64 encoding 📃utf8: UTF-8 text encoding 📝ascii: ASCII encoding 💻base64url: URL-safe Base64 encoding 🌐Works in both browser and Node.js environments with cryptographically secure random number generation. 🖥️ 📱
MIT License 🏛️
Contributions, issues, and feature requests are welcome! Feel free to check issues page.
Tom Tarpey
FAQs
Cryptographically secure random byte and number generator with multiple encoding support
The npm package deca-random-bytes receives a total of 0 weekly downloads. As such, deca-random-bytes popularity was classified as not popular.
We found that deca-random-bytes demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers 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
Claude Opus 4.6 has uncovered more than 500 open source vulnerabilities, raising new considerations for disclosure, triage, and patching at scale.

Research
/Security News
Malicious dYdX client packages were published to npm and PyPI after a maintainer compromise, enabling wallet credential theft and remote code execution.

Security News
gem.coop is testing registry-level dependency cooldowns to limit exposure during the brief window when malicious gems are most likely to spread.