{"id":13526495,"url":"https://github.com/MauriceButler/cryptr","last_synced_at":"2025-04-01T07:32:42.133Z","repository":{"id":7080920,"uuid":"8370043","full_name":"MauriceButler/cryptr","owner":"MauriceButler","description":"Very basic encrypt and decrypt node module","archived":false,"fork":false,"pushed_at":"2024-08-19T05:34:00.000Z","size":50,"stargazers_count":271,"open_issues_count":1,"forks_count":45,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-10-26T22:03:21.759Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/MauriceButler.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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},"funding":{"github":["MauriceButler"]}},"created_at":"2013-02-23T02:37:59.000Z","updated_at":"2024-09-26T12:20:13.000Z","dependencies_parsed_at":"2024-06-18T12:28:37.942Z","dependency_job_id":"534fd823-5d68-4a5b-b1d4-dcc2e1cc933c","html_url":"https://github.com/MauriceButler/cryptr","commit_stats":{"total_commits":41,"total_committers":9,"mean_commits":4.555555555555555,"dds":"0.24390243902439024","last_synced_commit":"ac698dd912aae3c23f5b85634de5e0f11537f457"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MauriceButler%2Fcryptr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MauriceButler%2Fcryptr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MauriceButler%2Fcryptr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MauriceButler%2Fcryptr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MauriceButler","download_url":"https://codeload.github.com/MauriceButler/cryptr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222709727,"owners_count":17026763,"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":[],"created_at":"2024-08-01T06:01:30.612Z","updated_at":"2024-11-02T11:31:12.634Z","avatar_url":"https://github.com/MauriceButler.png","language":"JavaScript","readme":"# cryptr\n\ncryptr is a simple `aes-256-gcm` encrypt and decrypt module for node.js\n\nIt is for doing simple encryption of values UTF-8 strings that need to be decrypted at a later time.\n\nIf you require anything more than that you probably want to use something more advanced or [crypto](https://nodejs.org/api/crypto.html) directly.\n\nThe Cryptr constructor takes 1 required argument, and an optional options object.\n\n`Cryptr(secret[, options])`\n\n-   secret: `\u003cstring\u003e`\n-   options: `\u003cObject\u003e`\n    -   encoding: `\u003cstring\u003e` Defaults to 'hex' (see [Node.js Buffer documentation] for valid options)\n    -   pbkdf2Iterations: `\u003cnumber\u003e` Defaults to 100000\n    -   saltLength: `\u003cnumber\u003e` Defaults to 64\n\nThe `salt` and `iv` are randomly generated and prepended to the result.\n\n**DO NOT USE THIS MODULE FOR ENCRYPTING PASSWORDS!**\n\nPasswords should be a one way hash. Use [bcrypt](https://npmjs.org/package/bcrypt) for that.\n\n## Install\n\n`npm install cryptr`\n\n## Usage\n\n```javascript\nconst Cryptr = require('cryptr');\nconst cryptr = new Cryptr('myTotallySecretKey');\n\nconst encryptedString = cryptr.encrypt('bacon');\nconst decryptedString = cryptr.decrypt(encryptedString);\n\nconsole.log(encryptedString); // 2a3260f5ac4754b8ee3021ad413ddbc11f04138d01fe0c5889a0dd7b4a97e342a4f43bb43f3c83033626a76f7ace2479705ec7579e4c151f2e2196455be09b29bfc9055f82cdc92a1fe735825af1f75cfb9c94ad765c06a8abe9668fca5c42d45a7ec233f0\nconsole.log(decryptedString); // bacon\n```\n\n#### With Options\n\n```javascript\nconst Cryptr = require('cryptr');\nconst cryptr = new Cryptr('myTotallySecretKey', { encoding: 'base64', pbkdf2Iterations: 10000, saltLength: 10 });\n\nconst encryptedString = cryptr.encrypt('bacon');\nconst decryptedString = cryptr.decrypt(encryptedString);\n\nconsole.log(encryptedString); // CPbKO/FFLQ8lVKxV+jYJcLcpTU0ZvW3D+JVfUecmJmLYY10UxYEa/wf8PWDQqhw=\nconsole.log(decryptedString); // bacon\n```\n\n[Node.js Buffer documentation]: https://nodejs.org/api/buffer.html#buffers-and-character-encodings\n","funding_links":["https://github.com/sponsors/MauriceButler"],"categories":["Repository"],"sub_categories":["Crypto"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMauriceButler%2Fcryptr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMauriceButler%2Fcryptr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMauriceButler%2Fcryptr/lists"}