Revert "Use shorter passphrase words, make them less than 32-characters long"
This reverts commit fdf8ae9201
.
This is reverted because the password length limit is now set much
higher, see: https://github.com/timvisee/send/pull/147
This commit is contained in:
parent
b2b287e34f
commit
6661a58770
1 changed files with 2 additions and 8 deletions
|
@ -1,11 +1,8 @@
|
|||
use chbs::{config::BasicConfig, prelude::*, word::WordList};
|
||||
use chbs;
|
||||
use clap::Arg;
|
||||
|
||||
use super::{CmdArg, CmdArgFlag};
|
||||
|
||||
/// How many words the passphrase should consist of.
|
||||
const PASSPHRASE_WORDS: usize = 5;
|
||||
|
||||
/// The passphrase generation argument.
|
||||
pub struct ArgGenPassphrase {}
|
||||
|
||||
|
@ -13,10 +10,7 @@ impl ArgGenPassphrase {
|
|||
/// Generate a cryptographically secure passphrase that is easily
|
||||
/// remembered using diceware.
|
||||
pub fn gen_passphrase() -> String {
|
||||
let mut config = BasicConfig::default();
|
||||
config.words = PASSPHRASE_WORDS;
|
||||
config.word_provider = WordList::builtin_eff_general_short().sampler();
|
||||
config.to_scheme().generate()
|
||||
chbs::passphrase()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue