{"id":22173224,"url":"https://github.com/litejs/crypto-lite","last_synced_at":"2025-06-23T05:36:42.017Z","repository":{"id":16243037,"uuid":"18990782","full_name":"litejs/crypto-lite","owner":"litejs","description":"Standard and secure cryptographic algorithms for browser","archived":false,"fork":false,"pushed_at":"2024-06-21T18:04:29.000Z","size":67,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-19T02:59:22.484Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/litejs.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}},"created_at":"2014-04-21T11:36:13.000Z","updated_at":"2024-06-21T18:04:32.000Z","dependencies_parsed_at":"2024-06-18T21:29:00.059Z","dependency_job_id":"e3a1dd33-67b5-414c-b0a8-1bf16018df1e","html_url":"https://github.com/litejs/crypto-lite","commit_stats":{"total_commits":40,"total_committers":1,"mean_commits":40.0,"dds":0.0,"last_synced_commit":"3d2284a7ad934d0068861be1e2b8a9d6e0d8ac46"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/litejs/crypto-lite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litejs%2Fcrypto-lite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litejs%2Fcrypto-lite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litejs%2Fcrypto-lite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litejs%2Fcrypto-lite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/litejs","download_url":"https://codeload.github.com/litejs/crypto-lite/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litejs%2Fcrypto-lite/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261095027,"owners_count":23108758,"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-12-02T07:31:21.648Z","updated_at":"2025-06-23T05:36:37.000Z","avatar_url":"https://github.com/litejs.png","language":"JavaScript","funding_links":["https://www.buymeacoffee.com/lauriro"],"categories":[],"sub_categories":[],"readme":"\n[1]: https://badgen.net/coveralls/c/github/litejs/crypto-lite\n[2]: https://coveralls.io/r/litejs/crypto-lite\n[3]: https://badgen.net/packagephobia/install/crypto-lite\n[4]: https://packagephobia.now.sh/result?p=crypto-lite\n[5]: https://badgen.net/badge/icon/Buy%20Me%20A%20Tea/orange?icon=kofi\u0026label\n[6]: https://www.buymeacoffee.com/lauriro\n\n\nCrypto lite \u0026ndash; [![Coverage][1]][2] [![Size][3]][4] [![Buy Me A Tea][5]][6]\n===========\n\nPure JavaScript cryptographic algorithms:\n\n - [RFC 3174][] - SHA-1 - Secure Hash Algorithm 1\n - [FIPS 180-2][] - SHA-256 - Secure Hash Algorithm 2\n - [RFC 3874][] - SHA-224 - A 224-bit One-way Hash Function\n - [RFC 2104][] - HMAC - Keyed-Hashing for Message Authentication\n - [RFC 8018][] - PBKDF2 - Password-Based Key Derivation Function 2\n - [RFC 6238][] - TOTP - Time-Based One-Time Password\n - [RFC 4226][] - HOTP - HMAC-Based One-Time Password\n\n\n[RFC 2104]: https://datatracker.ietf.org/doc/html/rfc2104\n[RFC 3174]: https://datatracker.ietf.org/doc/html/rfc3174\n[RFC 3874]: https://datatracker.ietf.org/doc/html/rfc3874\n[RFC 4226]: https://datatracker.ietf.org/doc/html/rfc4226\n[RFC 4648]: https://datatracker.ietf.org/doc/html/rfc4648\n[RFC 6238]: https://datatracker.ietf.org/doc/html/rfc6238\n[RFC 8018]: https://datatracker.ietf.org/doc/html/rfc8018\n[FIPS 180-2]: https://csrc.nist.gov/csrc/media/publications/fips/180/2/archive/2002-08-01/documents/fips180-2withchangenotice.pdf\n\n## How to use in browser\n\n```html\n\u003cscript src=crypto-lite.js\u003e\u003c/script\u003e\n\n\u003cscript\u003e\ncrypto.sha1(\"secret\")\n// e5e9fa1ba31ecd1ae84f75caaa474f3a663f05f4\ncrypto.sha256(\"secret\")\n// 2bb80d537b1da3e38bd30361aa855686bde0eacd7162fef6a25fe97bf527a25b\ncrypto.hmac(\"sha1\", \"key\", \"message\")\n// 2088df74d5f2146b48146caf4965377e9d0be3a4\ncrypto.hmac(\"sha256\", \"key\", \"message\")\n// 6e9ef29b75fffc5b7abae527d58fdadb2fe42e7219011976917343065f58ed4a\ncrypto.pbkdf2(\"password\", \"salt\", 1, 20, \"sha1\")\n// 0c60c80f961f0e71f3a9b524af6012062fe037a6\ncrypto.hotp(\"secret\", { counter: 1, digits 6, algo: \"sha1\" })\ncrypto.totp(\"secret\", { time: Date.now(), t0: 0, step: 30, digits 6, algo: \"sha1\" }) // Defaults\n\u003c/script\u003e\n```\n\nhotp/totp options accepts `{enc: \"base32\"}` for [RFC 4648 Base32][RFC 4648] encoding.\n\n\n## How to use in node.js\n\nAlthough it should work in node.js,\nyou should [use native](https://nodejs.org/api/crypto.html) api there.\n\nnpm install crypto-lite\n\n```javascript\nvar crypto = require(\"crypto-lite\").crypto\n\n```\n\n\nExternal links\n--------------\n\n[GitHub repo](https://github.com/litejs/crypto-lite) |\n[npm package](https://npmjs.org/package/crypto-lite) |\n[Coveralls coverage][2] |\n[Buy Me A Tea][6]\n\n\n### Licence\n\nCopyright (c) 2014-2022 Lauri Rooden \u0026lt;lauri@rooden.ee\u0026gt;  \n[The MIT License](https://lauri.rooden.ee/mit-license.txt)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flitejs%2Fcrypto-lite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flitejs%2Fcrypto-lite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flitejs%2Fcrypto-lite/lists"}