diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2018-03-26 15:56:52 +0200 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2018-04-04 16:05:29 +0200 |
commit | 14fdf11a35687889b88c244408a3ad62c2f21729 (patch) | |
tree | 43bfb06d96ec99a75692dc4df17d7307f6795900 /src | |
parent | 4741cfd14bf073a05d220c123000a75599baa224 (diff) | |
download | checkpw-14fdf11a35687889b88c244408a3ad62c2f21729.tar.gz checkpw-14fdf11a35687889b88c244408a3ad62c2f21729.tar.bz2 checkpw-14fdf11a35687889b88c244408a3ad62c2f21729.zip |
Nicer assert in k_anon test
Diffstat (limited to 'src')
-rw-r--r-- | src/main.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index c36ebd6..05dd895 100644 --- a/src/main.rs +++ b/src/main.rs @@ -47,8 +47,9 @@ fn to_k_anon(d: digest::Digest) -> (String, String) { #[test] fn test_k_anon() { let input = digest::digest(&digest::SHA1, "Passw0rd".as_bytes()); - let res = to_k_anon(input); - assert_eq!(res, (String::from("EBFC7"), String::from("910077770C8340F63CD2DCA2AC1F120444F"))); + let (range, rest) = to_k_anon(input); + assert_eq!(&range, "EBFC7"); + assert_eq!(&rest, "910077770C8340F63CD2DCA2AC1F120444F"); } struct Password { |