fn calc_auth(user: &str, pass: &str) -> String {
    let txt = format!("{}:{}", user, pass);
    let b64 = base64::encode(txt.as_bytes());
    trace!("received: {}", b64); // TODO remove this
    format!("Basic {}", &b64)
}
/// calculates the expected value for the "Authentication" header
///
/// # Examples
/// ```
/// assert_eq!(calc_auth("admin", "admin"), "Basic YWRtaW46YWRtaW4=");
/// ```
calculates the expected value for the "Authentication" header
calculates the expected value for the " Authentication " header
fn calc_auth(user: &str, pass: &str) -> String {
    let txt = format!("{}:{}", user, pass);
    let b64 = base64::encode(txt.as_bytes());
    trace!("received: {}", b64); // TODO remove this
    format!("Basic {}", &b64)
}
fn calc_auth ( user : & str , pass : & str ) -> String { let txt = format ! ( " " user pass ) ; let b64 = base64 :: encode ( txt . as_bytes ( ) ) ; trace ! ( " " b64 ) ; // TODO remove this format ! ( " " b64 ) }
calculates the expected value for the "Authentication" header
calculates the expected value for the " Authentication " header
user
&str
pass
&str
examples
None