{"id":20270940,"url":"https://github.com/mackron/sha1","last_synced_at":"2025-08-02T05:35:44.632Z","repository":{"id":145738588,"uuid":"459151483","full_name":"mackron/sha1","owner":"mackron","description":"SHA-1 hashing implementation","archived":false,"fork":false,"pushed_at":"2022-12-07T02:49:03.000Z","size":13,"stargazers_count":13,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-11T04:30:41.101Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","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/mackron.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":"2022-02-14T12:23:31.000Z","updated_at":"2024-12-25T12:35:57.000Z","dependencies_parsed_at":"2023-03-28T00:21:33.935Z","dependency_job_id":null,"html_url":"https://github.com/mackron/sha1","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mackron/sha1","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mackron%2Fsha1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mackron%2Fsha1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mackron%2Fsha1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mackron%2Fsha1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mackron","download_url":"https://codeload.github.com/mackron/sha1/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mackron%2Fsha1/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268339409,"owners_count":24234544,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"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":[],"created_at":"2024-11-14T12:35:04.082Z","updated_at":"2025-08-02T05:35:44.623Z","avatar_url":"https://github.com/mackron.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch4 align=\"center\"\u003eSHA-1 Hashing\u003c/h4\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://discord.gg/9vpqbjU\"\u003e\u003cimg src=\"https://img.shields.io/discord/712952679415939085?label=discord\u0026logo=discord\" alt=\"discord\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://twitter.com/mackron\"\u003e\u003cimg src=\"https://img.shields.io/twitter/follow/mackron?style=flat\u0026label=twitter\u0026color=1da1f2\u0026logo=twitter\" alt=\"twitter\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nA simple SHA-1 hashing implementation. Usage:\n\n    unsigned char digest[SHA1_SIZE];\n    sha1_context ctx;\n    sha1_init(\u0026ctx);\n    {\n        sha1_update(\u0026ctx, src, sz);\n    }\n    sha1_finalize(\u0026ctx, digest);\n\nThe above code is the literal implementation of `sha1()` which is a high level helper for hashing\ndata of a known size:\n\n    unsigned char hash[SHA1_SIZE];\n    sha1(hash, data, dataSize);\n\nUse `sha1_format()` to format the digest as a hex string. The capacity of the output buffer needs to\nbe at least `SHA1_SIZE_FORMATTED` bytes.\n\nThis library does not perform any memory allocations and does not use anything from the standard\nlibrary except for `size_t` and `NULL`, both of which are drawn in from stddef.h. No other standard\nheaders are included.\n\nThere is no need to link to anything with this library. You can use SHA1_IMPLEMENTATION to define\nthe implementation section, or you can use sha1.c if you prefer a traditional header/source pair.\n\nThis implements both methods defined in RFC 3174. Method 1 will be used by default. If you want to\nuse Method 2, define `SHA1_USE_RFC_METHOD_2` at compile time.\n\n    #define SHA1_USE_RFC_METHOD_2\n    #define SHA1_IMPLEMENTATION\n    #include \"sha1.h\"\n\nNo effort has been made to optimize this beyond the algorithms described in RGC 3174. If you're\nlooking for the fastest SHA-1 implementation you'll need to look elsewhere. An optimized\nimplementation may come later.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmackron%2Fsha1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmackron%2Fsha1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmackron%2Fsha1/lists"}