{"id":21905375,"url":"https://github.com/hex7c0/json-decrypt","last_synced_at":"2025-07-09T16:41:18.111Z","repository":{"id":23752820,"uuid":"27127029","full_name":"hex7c0/json-decrypt","owner":"hex7c0","description":"decrypt your json configuration with password","archived":false,"fork":false,"pushed_at":"2023-04-16T00:17:44.000Z","size":59,"stargazers_count":2,"open_issues_count":4,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-30T02:42:24.923Z","etag":null,"topics":["json-configuration","json-decrypt","nodejs"],"latest_commit_sha":null,"homepage":"https://github.com/hex7c0/json-decrypt","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hex7c0.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2014-11-25T13:28:21.000Z","updated_at":"2021-10-14T16:55:36.000Z","dependencies_parsed_at":"2024-11-28T16:43:56.535Z","dependency_job_id":null,"html_url":"https://github.com/hex7c0/json-decrypt","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/hex7c0/json-decrypt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hex7c0%2Fjson-decrypt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hex7c0%2Fjson-decrypt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hex7c0%2Fjson-decrypt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hex7c0%2Fjson-decrypt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hex7c0","download_url":"https://codeload.github.com/hex7c0/json-decrypt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hex7c0%2Fjson-decrypt/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264496160,"owners_count":23617699,"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":["json-configuration","json-decrypt","nodejs"],"created_at":"2024-11-28T16:33:05.507Z","updated_at":"2025-07-09T16:41:18.050Z","avatar_url":"https://github.com/hex7c0.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [json-decrypt](https://github.com/hex7c0/json-decrypt)\n\n[![NPM version](https://img.shields.io/npm/v/json-decrypt.svg)](https://www.npmjs.com/package/json-decrypt)\n[![Linux Status](https://img.shields.io/travis/hex7c0/json-decrypt.svg?label=linux-osx)](https://travis-ci.org/hex7c0/json-decrypt)\n[![Windows Status](https://img.shields.io/appveyor/ci/hex7c0/json-decrypt.svg?label=windows)](https://ci.appveyor.com/project/hex7c0/json-decrypt)\n[![Dependency Status](https://img.shields.io/david/hex7c0/json-decrypt.svg)](https://david-dm.org/hex7c0/json-decrypt)\n[![Coveralls](https://img.shields.io/coveralls/hex7c0/json-decrypt.svg)](https://coveralls.io/r/hex7c0/json-decrypt)\n\ndecrypt (or encrypt) your json configuration (or object) with a password.\nYou can save your key into user environment for decrypt this cfg file\n\n## Installation\n\nInstall through NPM\n\n```bash\nnpm install json-decrypt\n```\nor\n```bash\ngit clone git://github.com/hex7c0/json-decrypt.git\n```\n\n## API\n\ndecrypt your Object key, with an ENV passphrase\n```js\nvar decrypt = require('json-decrypt').decrypt;\n\nvar cfg = {\n  fix: 'ciao',\n  foo: 'hRzVwi8=',\n  pr: [ 'foo' ]\n};\n\nvar plaintext_cfg = decrypt(cfg, 'pr', process.env.p);\n```\n\nencrypt your Object key\n```js\nvar encrypt = require('json-decrypt').encrypt;\n\nvar cfg = {\n  fix: 'ciao',\n  foo: 'hex7c',\n  pr: [ 'foo' ]\n};\n\nvar ciphertext_cfg = encrypt(cfg, 'pr', process.env.p);\n```\n\n### decrypt(obj, index, key [, cipher [, encoding]])\n\n#### options\n\n - `obj` - **Object** Your object *(default \"required\")*\n - `index` - **String** Object key *(default \"required\")*\n - `key` - **String** Your Key *(default \"required\")*\n - `cipher` - **String** Cipher *(default \"aes-128-ctr\")*\n - `encoding` - **String** Output encoding *(default \"base64\")*\n\n## Examples\n\nTake a look at my [examples](examples)\n\n### [License GPLv3](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhex7c0%2Fjson-decrypt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhex7c0%2Fjson-decrypt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhex7c0%2Fjson-decrypt/lists"}