mirror of
https://github.com/timvisee/ffsend.git
synced 2025-10-03 17:49:15 +02:00
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 clap::Arg;
|
||||||
|
|
||||||
use super::{CmdArg, CmdArgFlag};
|
use super::{CmdArg, CmdArgFlag};
|
||||||
|
|
||||||
/// How many words the passphrase should consist of.
|
|
||||||
const PASSPHRASE_WORDS: usize = 5;
|
|
||||||
|
|
||||||
/// The passphrase generation argument.
|
/// The passphrase generation argument.
|
||||||
pub struct ArgGenPassphrase {}
|
pub struct ArgGenPassphrase {}
|
||||||
|
|
||||||
|
@ -13,10 +10,7 @@ impl ArgGenPassphrase {
|
||||||
/// Generate a cryptographically secure passphrase that is easily
|
/// Generate a cryptographically secure passphrase that is easily
|
||||||
/// remembered using diceware.
|
/// remembered using diceware.
|
||||||
pub fn gen_passphrase() -> String {
|
pub fn gen_passphrase() -> String {
|
||||||
let mut config = BasicConfig::default();
|
chbs::passphrase()
|
||||||
config.words = PASSPHRASE_WORDS;
|
|
||||||
config.word_provider = WordList::builtin_eff_general_short().sampler();
|
|
||||||
config.to_scheme().generate()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue