A bare runtime focused library for managing encrypted password vaults for Pearpass. This library provides a secure way to store, encrypt, and manage password vaults.
- Secure password vault creation and management
- Local encryption and decryption
- Event-based updates
- Vault sharing via invite codes
- Debug mode for development
- To ensure the security and integrity of your projects, please note that official PearPass packages are distributed exclusively through our GitHub organization.
- Any packages with similar names found on the npm registry or other third-party package managers are not affiliated with PearPass and should be strictly avoided. We recommend installing directly from this repository to ensure you are using the verified, open-source version.
npm install git+https://github.com/tetherto/pearpass-lib-vault-core.gitimport { createPearpassVaultClient } from '@tetherto/pearpass-lib-vault-core';
// Create a new client with a storage path
const client = createPearpassVaultClient('/path/to/storage', {
debugMode: false // Set to true for verbose logging
});const password = 'my-secure-password';
// hashing the password
const { hashedPassword, salt } = await client.hashPassword(password);
// Generate a random encryption key
const { ciphertext, nonce } = await client.encryptVaultKeyWithHashedPassword(hashedPassword);
// Encrypt existing vault key
const { ciphertext, nonce } = await client.encryptVaultWithKey(hashedPassword, key);// Get hashed password from user input
const hashedPassword = await client.getDecryptionKey({salt, password});
// Decrypt the vault key
const key = await client.decryptVaultKey({ciphertext, nonce, hashedPassword});// Initialize encryption
await client.encryptionInit();
// Initialize vaults storage
await client.vaultsInit();
// Store vault info
await client.vaultsAdd('vault/my-vault', {
id: 'my-vault',
name: 'My Password Vault',
hashedPassword,
ciphertext,
nonce,
salt,
});
// Initialize active vault
await client.activeVaultInit({
id: vaultId,
encryptionKey: key
});
// Add an entry to the vault
await client.activeVaultAdd(`record/${vaultId}`, {
name: 'GitHub',
username: '[email protected]',
password: 'secure-password'
});
// Retrieve passwords
const github = await client.activeVaultGet(`vault/${vaultId}`);
console.log(githubPassword);
// Close connections when done
await client.closeAllInstances();- Autopass
- Corestore
- Bare Crypto
- Bare FS
- Bare Path
- Bare RPC
- Sodium Native
- UDX Native
- Node.js Events
- @tetherto/pearpass-app-mobile - A mobile app for PearPass, a password manager
- @tetherto/pearpass-app-desktop - A desktop app for PearPass, a password manager
- @tetherto/pearpass-lib-vault - Library for managing encrypted vaults in applications
- @tetherto/pearpass-lib-vault-desktop - Client implementation for desktop applications
- @tetherto/tether-dev-docs - Documentations and guides for developers
This project is licensed under the Apache License, Version 2.0. See the LICENSE file for details.