#[cfg(test)] mod tests { use df_helper::cryptos; use df_helper::cryptos::md5; #[test] fn md5() { let data = md5::md5("111"); assert_eq!(data, "698d51a19d8a121ce581499d7b701668"); } #[test] fn to_sha256() { let data = cryptos::sha::to_sha256("111"); assert_eq!(data, "f6e0a1e2ac41945a9aa7ff8a8aaa0cebc12a3bcc981a929ad5cf810a090e11ae"); } #[test] fn to_sha1() { let data = cryptos::sha::to_sha1("111"); assert_eq!(data, "6216f8a75fd5bb3d5f22b6f9958cdede3fc086c2"); } }