Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
@adorsys/encrypt-down
Advanced tools
encrypt-down is an encryption layer for LevelDB.
For LevelDB exist several persistence bindings. Amongst others bindings for IndexedDB.
By using encrypt-down it is possible to store lots (several MB) of sensitive user data securely (encrypted) in the browser across user sessions.
npm install @adorsys/encrypt-down
We need a JSON Web Key (JWK) or JSON Web Key Set (JWKS) as specified by RFC 7517.
const memdown = require('memdown')
const encryptdown = require('@adorsys/encrypt-down')
const levelup = require('levelup')
const jwk = {
kty: 'oct',
alg: 'A256GCM',
use: 'enc',
k: '123456789abcdefghijklmnopqrstuvwxyz12345678'
}
const memdb = memdown()
const db = levelup(encryptdown(memdb, { jwk }))
db.put('key', { awesome: true }, function (err) {
memdb._get('key', { asBuffer: false }, function (err, value) {
console.log(value)
// eyJlbmMiOiJBMjU2R0NNIiwiYWxnIjoiZGlyIiwia2lkIjoialpESEVqN0ZhR3N5OHNUSUZLRWlnejB4TjFEVWlBZWp0S1ZNcEl2Z3dqOCJ9..LLeRPtRCpn-Zie6-.zZc0LQ_vvHCppRAaC5fxw4yJ0041l6mGOSgLDVnaPagSv_3Khp8a8lyAo9utHQKpVX6RNVaVPBQQxJpkw_Zyljeg7L-O_Nc3N2Hi_904qE6_zwORqQRc.R0JhfgTHIcD_93kXzZ8BrA
})
db.get('key', { asBuffer: false }, function (err, value) {
console.log(value)
// { awesome: true }
})
})
const db = require('@adorsys/encrypt-down')(db[, options])
db
must be an abstract-leveldown
compliant storeoptions
:
jwk
: a JSON Web Key (JWK) or JSON Web Key Set (JWKS) as specified by RFC 7517Made with :heart: by radzom and all these wonderful contributors (emoji key):
Vincent Weevers 💬 | Francis Pouatcha 🤔 | Boris Skert 📖 | Jan-Otto Kröpke 🚧 🚇 |
This project follows the all-contributors specification. Contributions of any kind are welcome!
Cross-browser Testing Platform and Open Source ♥ Provided by Sauce Labs.
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!
FAQs
Encryption layer for level-db
The npm package @adorsys/encrypt-down receives a total of 66 weekly downloads. As such, @adorsys/encrypt-down popularity was classified as not popular.
We found that @adorsys/encrypt-down demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.