{"id":15370206,"url":"https://github.com/jedisct1/rust-siphash","last_synced_at":"2025-05-15T18:07:59.971Z","repository":{"id":44933910,"uuid":"69944160","full_name":"jedisct1/rust-siphash","owner":"jedisct1","description":"SipHash (2-4, 1-3 + 128 bit variant) implementations for Rust","archived":false,"fork":false,"pushed_at":"2025-03-07T19:12:30.000Z","size":73,"stargazers_count":62,"open_issues_count":0,"forks_count":16,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-03T01:54:01.557Z","etag":null,"topics":["crypto","rust","siphash"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jedisct1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","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":"2016-10-04T07:50:32.000Z","updated_at":"2025-03-07T19:12:34.000Z","dependencies_parsed_at":"2024-10-19T07:38:04.709Z","dependency_job_id":"f29cd086-25f9-48e3-93f5-00120295e73c","html_url":"https://github.com/jedisct1/rust-siphash","commit_stats":{"total_commits":81,"total_committers":11,"mean_commits":7.363636363636363,"dds":"0.12345679012345678","last_synced_commit":"f57236be563e74ed9d4a3df93b6d2da15660bd18"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedisct1%2Frust-siphash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedisct1%2Frust-siphash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedisct1%2Frust-siphash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedisct1%2Frust-siphash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jedisct1","download_url":"https://codeload.github.com/jedisct1/rust-siphash/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254043219,"owners_count":22004912,"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":["crypto","rust","siphash"],"created_at":"2024-10-01T13:40:22.171Z","updated_at":"2025-05-15T18:07:59.913Z","avatar_url":"https://github.com/jedisct1.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"SipHash implementation for Rust\n===============================\n\nThis crates implements SipHash-2-4 and SipHash-1-3 in Rust.\n\nIt is based on the original implementation from rust-core and exposes the\nsame API.\n\nIt also implements SipHash variants returning 128-bit tags.\n\nThe `sip` module implements the standard 64-bit mode, whereas the `sip128`\nmodule implements the 128-bit mode.\n\nUsage\n-----\n\nIn `Cargo.toml`:\n\n```toml\n[dependencies]\nsiphasher = \"1\"\n```\n\nIf you want [serde](https://github.com/serde-rs/serde) support, include the feature like this:\n\n```toml\n[dependencies]\nsiphasher = { version = \"1\", features = [\"serde\"] }\n```\n\n64-bit mode:\n\n```rust\nuse siphasher::sip::{SipHasher, SipHasher13, SipHasher24};\n\n// one-shot:\n\nlet array: \u0026[u8] = \u0026[1, 2, 3];\nlet key: \u0026[u8; 16] = \u0026[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16];\nlet hasher = SipHasher13::new_with_key(key);\nlet h = hasher.hash(array);\n\n// incremental:\n\nuse core::hash::Hasher;\n\nlet array1: \u0026[u8] = \u0026[1, 2, 3];\nlet array2: \u0026[u8] = \u0026[4, 5, 6];\nlet key: \u0026[u8; 16] = \u0026[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16];\nlet mut hasher = SipHasher13::new_with_key(key);\nhasher.write(array1);\nhasher.write(array2);\nlet h = hasher.finish();\n```\n\n128-bit mode:\n\n```rust\nuse siphasher::sip128::{Hasher128, SipHasher, SipHasher13, SipHasher24};\n\n// one-shot:\n\nlet array: \u0026[u8] = \u0026[1, 2, 3];\nlet key: \u0026[u8; 16] = \u0026[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16];\nlet hasher = SipHasher13::new_with_key(key);\nlet h = hasher.hash(array).as_bytes();\n\n// incremental:\n\nuse core::hash::Hasher;\n\nlet array1: \u0026[u8] = \u0026[1, 2, 3];\nlet array2: \u0026[u8] = \u0026[4, 5, 6];\nlet key: \u0026[u8; 16] = \u0026[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16];\nlet mut hasher = SipHasher13::new_with_key(key);\nhasher.write(array1);\nhasher.write(array2);\nlet h = hasher.finish128().as_bytes();\n```\n\n[API documentation](https://docs.rs/siphasher/)\n-----------------------------------------------\n\nNote\n----\n\nDue to a confusing and not well documented API, methods from the `Hasher` trait of the standard library (`std::hash::Hasher`, `core::hash::Hasher`) produce non-portable results.\n\nThis is not specific to SipHash, and affects all hash functions.\n\nThe only safe methods in that trait are `write()` and `finish()`.\n\nIt is thus recommended to use SipHash (and all other hash functions, actually) as documented above.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjedisct1%2Frust-siphash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjedisct1%2Frust-siphash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjedisct1%2Frust-siphash/lists"}