{"id":13725751,"url":"https://github.com/lukeed/salteen","last_synced_at":"2025-10-09T18:24:56.477Z","repository":{"id":65492492,"uuid":"177481752","full_name":"lukeed/salteen","owner":"lukeed","description":"A snappy and lightweight (259B) utility to encrypt and decrypt values with salt.","archived":false,"fork":false,"pushed_at":"2019-03-30T18:36:43.000Z","size":8,"stargazers_count":95,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-14T16:44:39.250Z","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/lukeed.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}},"created_at":"2019-03-24T23:26:12.000Z","updated_at":"2023-04-29T04:44:51.000Z","dependencies_parsed_at":"2023-01-25T19:55:10.783Z","dependency_job_id":null,"html_url":"https://github.com/lukeed/salteen","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukeed%2Fsalteen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukeed%2Fsalteen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukeed%2Fsalteen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukeed%2Fsalteen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lukeed","download_url":"https://codeload.github.com/lukeed/salteen/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252953718,"owners_count":21830891,"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-03T01:02:33.662Z","updated_at":"2025-10-09T18:24:51.455Z","avatar_url":"https://github.com/lukeed.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# salteen [![Build Status](https://badgen.now.sh/travis/lukeed/salteen)](https://travis-ci.org/lukeed/salteen)\n\n\u003e A snappy and lightweight (259B) utility to encrypt and decrypt values with salt.\n\nBoth `encrypt` and `decrypt` are factory functions that accept a `salt` key and return new functions to be called with the unique value(s) to handle. This allows you reuse instances across multiple values.\n\nThis module is available in three formats:\n\n* **CommonJS**: `dist/salteen.js`\n* **ESModule**: `dist/salteen.mjs`\n* **UMD**: `dist/salteen.min.js`\n\n\n## Install\n\n```\n$ npm install --save salteen\n```\n\n\n## Usage\n\n```js\nconst { encrypt, decrypt } = require('salteen');\n\nconst MY_SALT = 'foobar'; // PS: the longer the better\n\nconst encoder = encrypt(MY_SALT);\nconst decoder = decrypt(MY_SALT);\n\n['hello', 'world'].map(encoder);\n//=\u003e ['7f727b7b78', '6078657b73']\n\n['7f727b7b78', '6078657b73'].map(decoder);\n//=\u003e ['hello', 'world']\n```\n\n\n## API\n\n### encrypt(salt)\nReturns: `Function`\n\nReturns a new `Function` which will accept a `value\u003cString\u003e` to be encrypted, using `salt` as the salting value.\n\n#### salt\nType: `String`\n\nThe salting value to be used – longer salts are more secure.\n\n### decrypt(salt)\nreturn `Function`\n\nReturns a new `Function` which will accept a `value\u003cString\u003e` to be decrypted, using `salt` as the salting value.\n\n#### salt\nType: `String`\n\nThe salting value to be used – longer salts are more secure.\n\n\n## Benchmarks\n\n\u003e Results below are with Node v11.11.0\n\n```\nencrypt  x 281,299 ops/sec ±0.66% (97 runs sampled)\ndecrypt  x 383,827 ops/sec ±1.81% (90 runs sampled)\n```\n\n\n## License\n\nMIT © [Luke Edwards](https://lukeed.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukeed%2Fsalteen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukeed%2Fsalteen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukeed%2Fsalteen/lists"}