Debian Codegraph @

src/password/test.rs

raw symbols SCIP
1 use craterust-analyzer cargo postgres-protocol 0.6.12 crate/::passwordrust-analyzer cargo postgres-protocol 0.6.12 password/;
2
3 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
4 fn test_encrypt_scram_sha_256rust-analyzer cargo postgres-protocol 0.6.12 password/test/test_encrypt_scram_sha_256().() {
5 // Specify the salt to make the test deterministic. Any bytes will do.
6 let salt: [u8; 16] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16];
7 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
8 passwordrust-analyzer cargo postgres-protocol 0.6.12 password/::scram_sha_256_saltrust-analyzer cargo postgres-protocol 0.6.12 password/scram_sha_256_salt().(b"secret", salt),
9 "SCRAM-SHA-256$4096:AQIDBAUGBwgJCgsMDQ4PEA==$8rrDg00OqaiWXJ7p+sCgHEIaBSHY89ZJl3mfIsf32oY=:05L1f+yZbiN8O0AnO40Og85NNRhvzTS57naKRWCcsIA="
10 );
11 }
12
13 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
14 fn test_encrypt_md5rust-analyzer cargo postgres-protocol 0.6.12 password/test/test_encrypt_md5().() {
15 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
16 passwordrust-analyzer cargo postgres-protocol 0.6.12 password/::md5rust-analyzer cargo postgres-protocol 0.6.12 password/md5().(b"secret", "foo"),
17 "md54ab2c5d00339c4b2a4e921d2dc4edec7"
18 );
19 }