
Security News
How Enterprise Security Is Adapting to AI-Accelerated Threats
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.
@orbitdb/simple-encryption
Advanced tools
A simple password encryption module that encrypts data using AES-GCM PBKDF2.
A simple password encryption module that encrypts data using AES-GCM PBKDF2.
NOTE This encryption module is not audited in any way for security and is intended for demonstration purposes only.
This project uses npm and nodejs.
npm i @orbitdb/simple-encryption
To implement encryption within your database, create an encryption object and pass it to OrbitDB's open function:
import { createOrbitDB } from '@orbitdb/core'
import { SimpleEncryption } from '@orbitdb/simple-encryption'
// Instantiate encryption for either data, replication or both.
const replication = await SimpleEncryption({ password: 'hello' })
const data = await SimpleEncryption({ password: 'world' })
const encryption = { data, replication }
// Set up OrbitDB. See https://github.com/orbitdb/orbitdb/blob/main/docs/GETTING_STARTED.md for more information if you are unfamiliar with OrbitDB.
const db = await orbitdb.open('db-encrypted', { encryption })
When replicating a database, initiate the same encryption configuration and pass it to open:
import { createOrbitDB } from '@orbitdb/core'
import { SimpleEncryption } from '@orbitdb/simple-encryption'
// Instantiate encryption for either data, replication or both.
const replication = await SimpleEncryption({ password: 'hello' })
const data = await SimpleEncryption({ password: 'world' })
const encryption = { data, replication }
const dbAddress = '0x0' // the address of the remote database.
// Set up OrbitDB. See https://github.com/orbitdb/orbitdb/blob/main/docs/GETTING_STARTED.md for more information if you are unfamiliar with OrbitDB.
const db = await orbitdb.open(dbAddress, { encryption })
Take a look at our organization-wide Contributing Guide. You'll find most of your questions answered there. Some questions may be answered in the FAQ, as well.
If you want to code but don't know where to start, check out the issues labelled "help wanted".
MIT OrbitDB Community
FAQs
A simple password encryption module that encrypts data using AES-GCM PBKDF2.
We found that @orbitdb/simple-encryption demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 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
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.