Registry / crypto / sha1
library0.11.0rscratesunverified

SHA-1 hash function implementation.

# Cargo.toml [dependencies] sha1 = "0.11.0"
INSTALL
IMPORT
SIG · SHA1
S
sha1
cryptorustv0.11.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Sha1
use sha1::Sha1;

Computes SHA-1 hash of a string.

use sha1::Sha1; fn main() { let mut hasher = Sha1::new(); hasher.update(b"hello world"); let result = hasher.digest(); println!("SHA-1: {}", result); }
Debug
Known issues
breakingSHA-1 is cryptographically broken and should not be used for security.
fix
Use SHA-256 or stronger hash functions for security.
affects: >=0.1.0
Upgrade
Version history
0.11.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
15 hits · last 30 days
node
14
Resources
sha1 — cargo add sha1 · libregistry