[][src]Function upwd::calculate_length

pub fn calculate_length(entropy: f64, pool_size: f64) -> f64

Calculates the required password length to obtain the given entropy.

Examples

let length = upwd::calculate_length(128.0, 64.0);

assert_eq!(length.ceil(), 22.0);