rust18.模块
1 | //前面有3节模块1,模块2,模块3的内容没有保存... |
模块4
1 | //cargo.toml |
- 使用这个库
1
2
3
4
5
6
7
8
9
10
11
12
13extern crate crypto;
use 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!("hash == {}",result);
}
Comment