{"id":20609204,"url":"https://github.com/akazwz/use-hashcode","last_synced_at":"2026-05-15T13:36:30.445Z","repository":{"id":57144673,"uuid":"459157259","full_name":"akazwz/use-hashcode","owner":"akazwz","description":"react use hashcode:  hash大文件, hash 字符串， 支持 md5, sha1, sha256, sha512, 基于crypto-js","archived":false,"fork":false,"pushed_at":"2022-02-23T06:29:38.000Z","size":134,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-31T06:33:24.995Z","etag":null,"topics":["bigfile","cryptojs","hash","hooks","md5","react","sha1","sha256","sha512"],"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/akazwz.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":"2022-02-14T12:41:24.000Z","updated_at":"2022-02-14T14:34:59.000Z","dependencies_parsed_at":"2022-09-05T11:50:23.604Z","dependency_job_id":null,"html_url":"https://github.com/akazwz/use-hashcode","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/akazwz/use-hashcode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akazwz%2Fuse-hashcode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akazwz%2Fuse-hashcode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akazwz%2Fuse-hashcode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akazwz%2Fuse-hashcode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akazwz","download_url":"https://codeload.github.com/akazwz/use-hashcode/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akazwz%2Fuse-hashcode/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33068814,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T11:35:32.926Z","status":"ssl_error","status_checked_at":"2026-05-15T11:35:31.362Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["bigfile","cryptojs","hash","hooks","md5","react","sha1","sha256","sha512"],"created_at":"2024-11-16T10:12:58.560Z","updated_at":"2026-05-15T13:36:30.426Z","avatar_url":"https://github.com/akazwz.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Installation\n\nnpm:\n\n```shell\nnpm i use-hashcode\n```\n\nyarn:\n\n```shell\nyarn add use-hashcode\n```\n\n## Prepare\nmake sure you have crypto-js\n```shell\nnpm i crypto-js\n```\nor\n```shell\nyarn add crypto-js\n```\n\n## Summary\n\nThis package makes hash things easier in react using crypto-js\n\n## Usage\n\n````tsx\nimport { useFileHashCode } from 'use-hashcode'\n\nconst App = () =\u003e {\n  const { isHashLoading, isHashError, sha256 } = useFileHashCode(file, 'sha256')\n  const strMd5 = useStringHashCode('Hello, World', 'md5')\n\n  return (\n    \u003cdiv\u003e\n      {sha256}\n      {strMd5}\n    \u003c/div\u003e\n  )\n}\n````\n\n## Hooks\n\n### 1.useFileHashCode:\n\n#### get hash code of file(include huge file), can custom chunk size, support MD5, Sha1, Sha256, Sha512\n\n### 2.useStringHashCode:\n\n#### get hash code of string, support MD5, Sha1, Sha256,Sha512","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakazwz%2Fuse-hashcode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakazwz%2Fuse-hashcode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakazwz%2Fuse-hashcode/lists"}