{"id":16064499,"url":"https://github.com/baoyachi/sha256-rs","last_synced_at":"2025-05-16T18:06:01.042Z","repository":{"id":45376241,"uuid":"334573857","full_name":"baoyachi/sha256-rs","owner":"baoyachi","description":"sha256 crypto digest write by rust","archived":false,"fork":false,"pushed_at":"2025-03-02T15:18:38.000Z","size":48,"stargazers_count":38,"open_issues_count":2,"forks_count":13,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T03:00:55.431Z","etag":null,"topics":["cypto","rust","sha-256","sha256"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/baoyachi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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":"2021-01-31T04:41:59.000Z","updated_at":"2025-03-03T11:30:27.000Z","dependencies_parsed_at":"2024-04-06T16:29:26.607Z","dependency_job_id":"54e6bb67-750f-47dd-ba5a-4752df4ac0f5","html_url":"https://github.com/baoyachi/sha256-rs","commit_stats":{"total_commits":48,"total_committers":8,"mean_commits":6.0,"dds":"0.33333333333333337","last_synced_commit":"5dab84061cd5556016a3a0a1c51380f80768c916"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baoyachi%2Fsha256-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baoyachi%2Fsha256-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baoyachi%2Fsha256-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baoyachi%2Fsha256-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/baoyachi","download_url":"https://codeload.github.com/baoyachi/sha256-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247112741,"owners_count":20885606,"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":["cypto","rust","sha-256","sha256"],"created_at":"2024-10-09T05:08:17.346Z","updated_at":"2025-04-04T04:00:18.796Z","avatar_url":"https://github.com/baoyachi.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# sha256 crypto digest\n\n[docsrs]: https://docs.rs/sha256\n\n[![GitHub Actions](https://github.com/baoyachi/sha256-rs/workflows/check/badge.svg)](https://github.com/baoyachi/sha256-rs/actions?query=workflow%3Abuild)\n[![Crates.io](https://img.shields.io/crates/v/sha256.svg)](https://crates.io/crates/sha256)\n[![Docs.rs](https://docs.rs/sha256/badge.svg)](https://docs.rs/sha256)\n[![Download](https://img.shields.io/crates/d/sha256)](https://crates.io/crates/sha256)\n\n\n## Examples\n\n#### sha256 digest function\n\n```rust\nuse sha256::digest;\n\nfn main() {\n    let input = String::from(\"hello\");\n    let val = digest(input);\n    assert_eq!(val,\"2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824\");\n    \n    //sha256 digest \u0026str\n    let input = \"hello\";\n    let val = digest(input);\n    assert_eq!(val,\"2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824\");\n    \n    //sha256 digest \u0026mut \u0026str\n    let mut input = \"hello\";\n    let val = digest(\u0026mut input);\n    assert_eq!(val,\"2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824\");\n    \n    //sha256 digest char\n    let mut input = 'π';\n    let val = digest(input);\n    assert_eq!(val,\"2617fcb92baa83a96341de050f07a3186657090881eae6b833f66a035600f35a\");\n\n\n    let input = b\"hello\";\n    let val = digest(input);\n    assert_eq!(val, \"2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824\");\n}\n```\n\n#### sha256 try_digest function\n\n```rust\nuse sha256::try_digest;\nuse std::path::Path;\n\nfn main() {\n    let input = Path::new(\"./foo.file\");\n    let val = try_digest(input).unwrap();\n    assert_eq!(val,\"433855b7d2b96c23a6f60e70c655eb4305e8806b682a9596a200642f947259b1\");\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaoyachi%2Fsha256-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbaoyachi%2Fsha256-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaoyachi%2Fsha256-rs/lists"}