📜  rust sha256 - 任何代码示例

📅  最后修改于: 2022-03-11 14:57:43.691000             🧑  作者: Mango

代码示例1
// Install the sha256 and put it in your Cargo.toml
use sha256::digest;
// sha256 digest string
fn main() {
    let input = "hello";
    let val = digest(input);
    assert_eq!(val, "2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824")
}