Debian Codegraph @

.cargo/vendor/sha1/tests/mod.rs

raw
1 use digest::dev::{feed_rand_16mib, fixed_reset_test};
2 use hex_literal::hex;
3 use sha1::{Digest, Sha1};
4
5 digest::new_test!(sha1_main, "sha1", Sha1, fixed_reset_test);
6
7 #[test]
8 fn sha1_rand() {
9 let mut h = Sha1::new();
10 feed_rand_16mib(&mut h);
11 assert_eq!(
12 h.finalize()[..],
13 hex!("7e565a25a8b123e9881addbcedcd927b23377a78")[..]
14 );
15 }