{"id":18951297,"url":"https://github.com/adorsys/encrypt-down","last_synced_at":"2025-04-16T00:31:54.903Z","repository":{"id":33153421,"uuid":"142570030","full_name":"adorsys/encrypt-down","owner":"adorsys","description":"An abstract-leveldown implementation that wraps another store to encrypt the stored values.","archived":false,"fork":false,"pushed_at":"2023-04-28T03:56:39.000Z","size":2547,"stargazers_count":18,"open_issues_count":8,"forks_count":3,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-09-20T06:11:57.394Z","etag":null,"topics":["database","encryption","level","level-db"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adorsys.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-07-27T11:40:55.000Z","updated_at":"2024-05-17T10:46:55.000Z","dependencies_parsed_at":"2024-06-19T01:33:14.884Z","dependency_job_id":"015697fe-05a1-40c4-b8da-f3fcf6c2d37f","html_url":"https://github.com/adorsys/encrypt-down","commit_stats":{"total_commits":43,"total_committers":5,"mean_commits":8.6,"dds":0.5348837209302326,"last_synced_commit":"ccba5f3818e59ec294207b3806298ce1ab94f8cd"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adorsys%2Fencrypt-down","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adorsys%2Fencrypt-down/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adorsys%2Fencrypt-down/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adorsys%2Fencrypt-down/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adorsys","download_url":"https://codeload.github.com/adorsys/encrypt-down/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223691241,"owners_count":17186771,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","encryption","level","level-db"],"created_at":"2024-11-08T13:27:22.431Z","updated_at":"2024-11-08T13:27:23.099Z","avatar_url":"https://github.com/adorsys.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# :closed_lock_with_key: encrypt-down :closed_lock_with_key:\n\u003c!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --\u003e\n[![All Contributors](https://img.shields.io/badge/all_contributors-4-orange.svg?style=flat-square)](#contributors-)\n\u003c!-- ALL-CONTRIBUTORS-BADGE:END --\u003e\n\n[![leveldb](https://leveljs.org/img/badge.svg)](https://github.com/level/awesome)\n[![Travis](https://img.shields.io/travis/adorsys/encrypt-down.svg)](https://travis-ci.org/adorsys/encrypt-down)\n[![Coveralls](https://img.shields.io/coveralls/adorsys/encrypt-down.svg)](https://coveralls.io/github/adorsys/encrypt-down)\n[![npm](https://img.shields.io/npm/v/@adorsys/encrypt-down.svg)](https://www.npmjs.com/package/@adorsys/encrypt-down)\n[![npm](https://img.shields.io/npm/dt/@adorsys/encrypt-down.svg)](https://www.npmjs.com/package/@adorsys/encrypt-down)\n[![Conventional Commits](https://img.shields.io/badge/Conventional_Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier#readme)\n[![NpmLicense](https://img.shields.io/npm/l/@adorsys/encrypt-down.svg)](https://github.com/adorsys/encrypt-down/blob/master/LICENSE)\n\nencrypt-down is an encryption layer for LevelDB. \n\nFor LevelDB exist several persistence bindings. \nAmongst others bindings for [IndexedDB](https://developer.mozilla.org/de/docs/IndexedDB).\n\nBy using encrypt-down it is possible to store lots (several MB) of sensitive user data securely (encrypted) in the browser across user sessions.\n\n### Installation\n\n```bash\nnpm install @adorsys/encrypt-down\n```\n\n### Usage\n\nWe need a JSON Web Key (JWK) or JSON Web Key Set (JWKS) as specified by [RFC 7517](https://tools.ietf.org/html/rfc7517).\n\n```js\nconst memdown = require('memdown')\nconst encryptdown = require('@adorsys/encrypt-down')\nconst levelup = require('levelup')\nconst jwk = {\n  kty: 'oct',\n  alg: 'A256GCM',\n  use: 'enc',\n  k: '123456789abcdefghijklmnopqrstuvwxyz12345678'\n}\nconst memdb = memdown()\nconst db = levelup(encryptdown(memdb, { jwk }))\n\ndb.put('key', { awesome: true }, function (err) {\n  memdb._get('key', { asBuffer: false }, function (err, value) {\n        console.log(value)\n        // eyJlbmMiOiJBMjU2R0NNIiwiYWxnIjoiZGlyIiwia2lkIjoialpESEVqN0ZhR3N5OHNUSUZLRWlnejB4TjFEVWlBZWp0S1ZNcEl2Z3dqOCJ9..LLeRPtRCpn-Zie6-.zZc0LQ_vvHCppRAaC5fxw4yJ0041l6mGOSgLDVnaPagSv_3Khp8a8lyAo9utHQKpVX6RNVaVPBQQxJpkw_Zyljeg7L-O_Nc3N2Hi_904qE6_zwORqQRc.R0JhfgTHIcD_93kXzZ8BrA\n  })\n  db.get('key', { asBuffer: false }, function (err, value) {\n    console.log(value) \n    // { awesome: true }\n  })\n})\n```\n\n### Browser Support\n\n[![Sauce Test Status](https://saucelabs.com/browser-matrix/adorsysbot.svg)](https://saucelabs.com/u/adorsysbot)\n\n## API\n\n### `const db = require('@adorsys/encrypt-down')(db[, options])`\n\n-   `db` must be an [`abstract-leveldown`](https://github.com/level/abstract-leveldown) compliant store\n-   `options`:\n    -   `jwk`: a JSON Web Key (JWK) or JSON Web Key Set (JWKS) as specified by [RFC 7517](https://tools.ietf.org/html/rfc7517)\n\n## Credits\n\nMade with :heart: by [radzom](https://github.com/radzom) and all these wonderful contributors ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://vincentweevers.nl/\"\u003e\u003cimg src=\"https://avatars2.githubusercontent.com/u/3055345?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eVincent Weevers\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#question-vweevers\" title=\"Answering Questions\"\u003e💬\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/francis-pouatcha\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/1225651?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eFrancis Pouatcha\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#ideas-francis-pouatcha\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/borisskert\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/25199775?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eBoris Skert\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/adorsys/encrypt-down/commits?author=borisskert\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/jkroepke\"\u003e\u003cimg src=\"https://avatars3.githubusercontent.com/u/1560587?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eJan-Otto Kröpke\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#maintenance-jkroepke\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e \u003ca href=\"#infra-jkroepke\" title=\"Infrastructure (Hosting, Build-Tools, etc)\"\u003e🚇\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind are welcome!\n\n## Big Thanks\n\nCross-browser Testing Platform and Open Source ♥ Provided by [Sauce Labs](https://saucelabs.com).\n\n[![Sauce Labs logo](./Sauce-Labs.png)](https://saucelabs.com)\n\n## Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadorsys%2Fencrypt-down","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadorsys%2Fencrypt-down","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadorsys%2Fencrypt-down/lists"}