以求哈希为例子 123456789[package]name = "list"version = "0.1.0"edition = "2021"# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html[dependencies]rust-crypto = "0.2" //使用外部的包 src/main.rs 12345678910use crypto::digest::Digest;use crypto::sha3::Sha3;fn main() { let mut hasher = Sha3::sha3_256(); hasher.input_str("Hello world"); let result = hasher.result_str(); //求出的哈希值 println!("Hello world"); } 之后进行运行 1cargo run