A powerful Node.js utility for selective file encryption that keeps your sensitive data secure.
AES-256-GCM encryption with secure key derivation using PBKDF2 with salt.
Encrypt individual files or entire directories with customizable ignore patterns.
Add an extra layer of security with optional license key binding.
Easily re-encrypt files with a new key to maintain security best practices.
Decrypt files in memory without writing sensitive data to disk.
Seamlessly integrate with live applications using the runtime API.
# Encrypt a file or directory
frostbite lock path/to/sensitive --key mySecretKey
# Decrypt a file or directory
frostbite unlock path/to/sensitive.fbz --key mySecretKey
# Re-encrypt with a new key
frostbite rekey path/to/sensitive.fbz --old-key oldKey --new-key newKey
# Watch files for changes (live project mode)
frostbite watch path/to/directory --key mySecretKey
const frostbite = require('frostbite');
// Encrypt a file or directory
await frostbite.encrypt('path/to/sensitive', {
key: 'mySecretKey',
license: 'optional-license'
});
// Decrypt a file or directory
await frostbite.decrypt('path/to/sensitive.fbz', {
key: 'mySecretKey',
license: 'optional-license'
});
// Re-encrypt with a new key
await frostbite.rekey('path/to/sensitive.fbz', {
oldKey: 'oldSecretKey',
newKey: 'newSecretKey'
});
const frostbite = require('frostbite');
// Create a runtime instance
const runtime = frostbite.createRuntime({
key: process.env.FROSTBITE_KEY
});
// Initialize the runtime
await runtime.initialize();
// Decrypt a file without writing to disk
const config = await runtime.requireJSON('./config.json.fbz');
// Watch files for changes
await runtime.watch('./config', {
autoDecrypt: true,
autoEncrypt: true
});
Keep your sensitive configuration files secure while still allowing your application to access them.
View ExampleSee how to integrate Frostbite into a live Node.js application with automatic configuration reloading.
View ExampleLearn how to securely manage encrypted files in your continuous integration and deployment workflows.
View ExampleComplete documentation for all command line interface options and flags.
Read MoreDetailed API documentation for programmatic usage in your applications.
Read MoreLearn how to use the runtime API for live project integration.
Read MoreBest practices for managing encryption keys and securing your data.
Read More