/*-
 * Scram-rs - a SCRAM authentification authorization library
 * 
 * Copyright (C) 2021  Aleksandr Morozov
 * Copyright (C) 2025 Aleksandr Morozov
 * 
 * The syslog-rs crate can be redistributed and/or modified
 * under the terms of either of the following licenses:
 *
 *   1. the Mozilla Public License Version 2.0 (the “MPL”) OR
 *
 *   2. The MIT License (MIT)
 *                     
 *   3. EUROPEAN UNION PUBLIC LICENCE v. 1.2 EUPL © the European Union 2007, 2016
 */


pub use super::scram_sync_client::*;
pub use super::scram_sync_server::*;

#[cfg(test)]
mod test_internals
{
    use crate::{scram_parser::ScramData, scram_state::ScramState};

    #[test]
    fn scram_incorrect_test()
    {
        #[cfg(feature = "std")]
        use std::time::Instant;

        let server_init = "r=rOprNGfwEbeRWgbNEkqO%hvYDpWUa2RaTCAfuxFIlj)hNlF$k0,s=W22ZaJ0SNY7soEsUEjb6gQ==,i=4096";
        #[cfg(feature = "std")]
        let start = Instant::now();
        
        let res = ScramData::try_from((server_init, &ScramState::WaitForServInitMsg, false));
        
        #[cfg(feature = "std")]
        let el = start.elapsed();
        #[cfg(feature = "std")]
        println!("took: {:?}", el);

        assert_eq!(res.is_ok(), true);

        return;
    } 
}
