pub fn new(password: &[u8]) -> io::Result<ScramSha256> {
        let mut rng = OsRng::new()?;
        let nonce = (0..NONCE_LENGTH)
            .map(|_| {
                let mut v = rng.gen_range(0x21u8, 0x7e);
                if v == 0x2c {
                    v = 0x7e
                }
                v as char
            })
            .collect::<String>();

        ScramSha256::new_inner(password, nonce)
    }
/// Constructs a new instance which will use the provided password for authentication.
Constructs a new instance which will use the provided password for authentication.
Constructs a new instance which will use the provided password for authentication .
pub fn new(password: &[u8]) -> io::Result<ScramSha256> {
        let mut rng = OsRng::new()?;
        let nonce = (0..NONCE_LENGTH)
            .map(|_| {
                let mut v = rng.gen_range(0x21u8, 0x7e);
                if v == 0x2c {
                    v = 0x7e
                }
                v as char
            })
            .collect::<String>();
        ScramSha256::new_inner(password, nonce)
    }
pub fn new ( password : & [ u8 ] ) -> io :: Result < ScramSha256 > { let mut rng = OsRng :: new ( ) ? ; let nonce = ( 0 .. NONCE_LENGTH ) . map ( | _ | { let mut v = rng . gen_range ( 0x21u8 , 0x7e ) ; if v == 0x2c { v = 0x7e } v as char } ) . collect :: < String > ( ) ; ScramSha256 :: new_inner ( password , nonce ) }
Constructs a new instance which will use the provided password for authentication.
Constructs a new instance which will use the provided password for authentication .
password
&[u8]
password
&[u8]