{"id":57222,"library":"digest","title":"digest","description":"Traits for cryptographic hash functions and message authentication codes.","status":"active","version":"0.11.3","language":"rust","source_language":null,"source_url":"https://github.com/RustCrypto/traits","tags":["cryptography","hash","traits","mac"],"install":[{"cmd":"# Cargo.toml\n[dependencies]\ndigest = \"0.11.3\"","lang":"toml","label":"Cargo.toml"},{"cmd":"cargo add digest","lang":"bash","label":"cargo add"}],"dependencies":[],"imports":[{"symbol":"Digest","correct":"use digest::Digest;"}],"quickstart":{"code":"use digest::Digest;\nuse sha2::Sha256;\n\nfn main() {\n    let mut hasher = Sha256::new();\n    hasher.update(b\"hello world\");\n    let result = hasher.finalize();\n    println!(\"{:x}\", result);\n}","lang":"rust","description":"Computes a SHA-256 hash using the Digest trait."},"warnings":[{"fix":"Add a hash crate like sha2 to your dependencies.","message":"The Digest trait requires a concrete hash implementation (e.g., sha2, sha3) to be used.","severity":"gotcha","affected_versions":">=0.11.0"}],"env_vars":null,"search_vec":"'authent':9 'code':10 'cryptograph':4 'cryptographi':11 'digest':1 'function':6 'hash':5,12 'mac':14 'messag':8 'trait':2,13","created_at":"2026-06-16T15:33:44.743173+00:00","updated_at":"2026-06-16T15:33:44.743173+00:00","problems":[],"ecosystem":"crates","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/RustCrypto/traits","github":"https://github.com/RustCrypto/traits","docs":"https://docs.rs/digest/","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["crypto"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-16","next_check":"2026-12-13","install_tag":null}}