{"id":21382361,"url":"https://github.com/lucacicada/xipher","last_synced_at":"2026-03-02T04:32:47.546Z","repository":{"id":245817695,"uuid":"819314525","full_name":"lucacicada/xipher","owner":"lucacicada","description":"xipher is a simple wrapper around the subtle crypto API.","archived":false,"fork":false,"pushed_at":"2024-06-24T13:51:05.000Z","size":102,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-19T08:04:14.430Z","etag":null,"topics":["hmac","sha256","subtlecrypto"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/lucacicada.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":"2024-06-24T09:02:51.000Z","updated_at":"2024-06-24T15:23:45.000Z","dependencies_parsed_at":"2024-06-24T10:41:35.040Z","dependency_job_id":"213a2eea-8279-4347-8bee-0061d6dbcc50","html_url":"https://github.com/lucacicada/xipher","commit_stats":null,"previous_names":["lucacicada/xipher"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/lucacicada/xipher","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucacicada%2Fxipher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucacicada%2Fxipher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucacicada%2Fxipher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucacicada%2Fxipher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lucacicada","download_url":"https://codeload.github.com/lucacicada/xipher/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucacicada%2Fxipher/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29992311,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T01:47:34.672Z","status":"online","status_checked_at":"2026-03-02T02:00:07.342Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["hmac","sha256","subtlecrypto"],"created_at":"2024-11-22T10:58:53.230Z","updated_at":"2026-03-02T04:32:47.509Z","avatar_url":"https://github.com/lucacicada.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# xipher\n\n[![npm version][npm-version-src]][npm-version-href]\n[![npm downloads][npm-downloads-src]][npm-downloads-href]\n[![bundle][bundle-src]][bundle-href]\n[![License][license-src]][license-href]\n\nxipher is a simple wrapper around the subtle crypto API.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\".github/assets/xiper.png\" alt=\"Thumbnail\" /\u003e\n\u003c/p\u003e\n\n## Installation\n\n```bash\npnpm add xipher\n```\n\n## Usage\n\n### `pbkdf2(password, keyLength)`\n\nDerive a key from a base password using pbkdf2.\n\n```ts\nimport { pbkdf2 } from 'xipher'\n\n// Generate a 32 bytes key from the password 'password'\nconst key = await pbkdf2('password', 32)\n```\n\n### `sha256(data)`\n\nHash data using sha256.\n\n```ts\nimport { sha256 } from 'xipher'\n\nconst hash = await sha256('...')\n```\n\n## Security Considerations\n\nYou have read this section already pretty much everywhere.\n\nSecurity is not a thing that is either there or not, it's a process.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://imgs.xkcd.com/comics/security.png\" alt=\"Security\" width=\"400\" /\u003e\n\u003c/p\u003e\n\nUltimately, there is no algorithm to determine whether an encryption is secure, there is just a bunch of very smart folks trying to break it.\nSure some pattern of attack emerges, but still, there is no life-equation that determines whether a algorithm is secure or not.\nAs you might have already guess, if there is no algorithm to determine whether an encryption standard is secure, there is no algorithm to determine whether your specific implementation is secure.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://imgs.xkcd.com/comics/security_holes.png\" alt=\"Security Holes\" width=\"400\" /\u003e\n\u003c/p\u003e\n\nSo here's the rule, the word \"secure\" have no meaning, secure from what? secure when? secure how?\nWhiteout addressing those questions, the word \"secure\" is just a buzzword.\n\nOk then, what should you do?\n\nThis library uses the Web Crypto API, which is a well-tested and secure API.\nCertain functionality are just wrappers around that API, others are implemented by gluing together those functionalities.\n\n## License\n\n[MIT](./LICENSE)\n\n[npm-version-src]: https://img.shields.io/npm/v/xipher?style=flat\u0026colorA=1c1c1c\u0026colorB=dead38\n[npm-version-href]: https://npmjs.com/package/xipher\n[npm-downloads-src]: https://img.shields.io/npm/dm/xipher?style=flat\u0026colorA=1c1c1c\u0026colorB=dead38\n[npm-downloads-href]: https://npmjs.com/package/xipher\n[bundle-src]: https://img.shields.io/bundlephobia/minzip/xipher?style=flat\u0026colorA=1c1c1c\u0026colorB=dead38\n[bundle-href]: https://bundlephobia.com/result?p=xipher\n[license-src]: https://img.shields.io/github/license/lucacicada/xipher.svg?style=flat\u0026colorA=1c1c1c\u0026colorB=dead38\n[license-href]: https://github.com/lucacicada/xipher/blob/main/LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucacicada%2Fxipher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucacicada%2Fxipher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucacicada%2Fxipher/lists"}