LCOV - code coverage report
Current view: top level - libs/proxy/postgres-protocol2/src/password - test.rs (source / functions) Coverage Total Hit
Test: 07bee600374ccd486c69370d0972d9035964fe68.info Lines: 100.0 % 8 8
Test Date: 2025-02-20 13:11:02 Functions: 100.0 % 2 2

            Line data    Source code
       1              : use crate::password;
       2              : 
       3              : #[tokio::test]
       4            1 : async fn test_encrypt_scram_sha_256() {
       5            1 :     // Specify the salt to make the test deterministic. Any bytes will do.
       6            1 :     let salt: [u8; 16] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16];
       7            1 :     assert_eq!(
       8            1 :         password::scram_sha_256_salt(b"secret", salt).await,
       9            1 :         "SCRAM-SHA-256$4096:AQIDBAUGBwgJCgsMDQ4PEA==$8rrDg00OqaiWXJ7p+sCgHEIaBSHY89ZJl3mfIsf32oY=:05L1f+yZbiN8O0AnO40Og85NNRhvzTS57naKRWCcsIA="
      10            1 :     );
      11            1 : }
        

Generated by: LCOV version 2.1-beta