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

securecrypt

v0.0.6

Published

SecureCrypt: High-performance Node.js encryption library. Provides AES-256-GCM encryption, PBKDF2-based key derivation, secure file & text encryption, password generation, and multi-threaded processing for maximum speed and security.

Readme

SecureCrypt

SecureCrypt is a high-performance encryption library for Node.js, designed for developers who need fast, robust encryption and secure password handling. It supports AES-256-GCM encryption, PBKDF2 password-based key derivation, file & text encryption, secure password generation, multi-threaded file processing, and file metadata verification.


Features

  • AES-256-GCM Encryption: Authenticated encryption for text and files.
  • PBKDF2 Key Derivation: Securely derive keys from passwords with configurable iterations.
  • File Encryption: Encrypt large files with progress reporting.
  • Text Encryption: Safely encrypt and decrypt strings.
  • Secure Password Generation: Generate strong, customizable random passwords.
  • Password Strength Validation: Check passwords for length, complexity, and repeated characters.
  • Multi-threaded File Processing: Encrypt multiple files in parallel using worker threads.
  • File Metadata & Info: Verify if a file is encrypted and gather metadata.
  • Secure File Wiping: Overwrite files with random data before deletion.

⚠️ The benchmark feature exists in the library but does not work reliably and may give inaccurate results.


Installation

npm install securecrypt
# or using yarn
yarn add securecrypt

Usage

Import Library

const SecureCrypt = require('securecrypt');

Text Encryption & Decryption

const password = 'StrongPassword123!';
const message = 'Hello, SecureCrypt!';

// Encrypt
const encrypted = SecureCrypt.encryptText(message, password);
console.log('Encrypted Data:', encrypted.encryptedData);

// Decrypt
const decrypted = SecureCrypt.decryptText(encrypted.encryptedData, password);
if (decrypted.success) {
    console.log('Decrypted Text:', decrypted.decryptedText);
} else {
    console.error('Decryption Failed:', decrypted.error);
}

File Encryption & Decryption

const inputFile = './example.txt';
const encryptedFile = './example.txt.secrypt';
const decryptedFile = './example_decrypted.txt';

// Encrypt file
SecureCrypt.encryptFile(inputFile, encryptedFile, password, {
    onProgress: (progress) => console.log(`Encrypting: ${progress.percentage.toFixed(2)}%`)
}).then(result => {
    console.log('File encrypted successfully', result);

    // Decrypt file
    return SecureCrypt.decryptFile(encryptedFile, decryptedFile, password, {
        onProgress: (progress) => console.log(`Decrypting: ${progress.percentage.toFixed(2)}%`)
    });
}).then(result => {
    console.log('File decrypted successfully', result);
}).catch(err => {
    console.error(err);
});

Generate Secure Passwords

const password = SecureCrypt.generateSecurePassword(16);
console.log('Generated Password:', password);

Validate Password Strength

const result = SecureCrypt.validatePassword('WeakPass123');
console.log(result);

/*
Example output:
{
  isValid: false,
  score: 3,
  feedback: ["Password should contain special characters"],
  strength: "Weak"
}
*/

Check if File is Encrypted

if (SecureCrypt.isEncryptedFile('./example.txt.secrypt')) {
    console.log('File is encrypted with SecureCrypt.');
}

Get File Info

const info = SecureCrypt.getFileInfo('./example.txt.secrypt');
console.log(info);

/*
Example output:
{
  path: './example.txt.secrypt',
  size: 12345,
  isFile: true,
  encrypted: true,
  algorithm: 'aes-256-gcm',
  iterations: 100000,
  encryptedSize: 12300,
  created: 2025-09-14T00:00:00.000Z,
  modified: 2025-09-14T00:01:00.000Z,
}
*/

Securely Wipe a File

SecureCrypt.secureWipeFile('./secret.txt', 3)
    .then(() => console.log('File securely wiped'))
    .catch(err => console.error(err));

Multi-threaded File Encryption

const files = ['./file1.txt', './file2.txt'];
SecureCrypt.encryptFilesParallel(files, password, { workers: 2, outputDir: './encrypted' })
    .then(results => console.log('Parallel encryption results:', results))
    .catch(err => console.error(err));

System Information

console.log(SecureCrypt.getSystemInfo());

/*
Example output:
{
  platform: 'win32',
  architecture: 'x64',
  cpus: 8,
  totalMemory: '16384MB',
  freeMemory: '8192MB',
  nodeVersion: 'v20.0.0',
  recommendedChunkSize: 65536,
  version: '0.x.x'
}
*/

License

MIT © 2025 Bluezly