Increase TOPT secret length
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
930cb8bf33
commit
4511f0f5c7
@ -21,7 +21,7 @@ pub struct TotpKey {
|
|||||||
impl TotpKey {
|
impl TotpKey {
|
||||||
/// Generate a new TOTP key
|
/// Generate a new TOTP key
|
||||||
pub fn new_random() -> Self {
|
pub fn new_random() -> Self {
|
||||||
let random_bytes = rand::thread_rng().gen::<[u8; 10]>();
|
let random_bytes = rand::thread_rng().gen::<[u8; 20]>();
|
||||||
Self {
|
Self {
|
||||||
encoded: base32::encode(BASE32_ALPHABET, &random_bytes),
|
encoded: base32::encode(BASE32_ALPHABET, &random_bytes),
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user