diff options
author | Harsh Shandilya <me@msfjarvis.dev> | 2022-12-09 18:20:02 +0530 |
---|---|---|
committer | Harsh Shandilya <me@msfjarvis.dev> | 2022-12-09 18:22:25 +0530 |
commit | 2d3d6707e83b42d675b9c12f96c6c0f7e2dd0f32 (patch) | |
tree | 6106975d0b25a8bd8c7ac170cb08c19f405c775a /passgen/random/src | |
parent | 9f89e1dbf5a82b3e52a8b3377cd3ccc6853a9bab (diff) |
chore(deps): upgrade ktfmt to 0.42
Diffstat (limited to 'passgen/random/src')
2 files changed, 11 insertions, 13 deletions
diff --git a/passgen/random/src/main/kotlin/app/passwordstore/passgen/random/RandomPasswordGenerator.kt b/passgen/random/src/main/kotlin/app/passwordstore/passgen/random/RandomPasswordGenerator.kt index ddb6809c..80e5e583 100644 --- a/passgen/random/src/main/kotlin/app/passwordstore/passgen/random/RandomPasswordGenerator.kt +++ b/passgen/random/src/main/kotlin/app/passwordstore/passgen/random/RandomPasswordGenerator.kt @@ -11,17 +11,16 @@ internal object RandomPasswordGenerator { /** * Generates a random password of length [targetLength], taking the following flags in [pwFlags] * into account, or fails to do so and returns null: - * * - [PasswordGenerator.DIGITS]: If set, the password will contain at least one digit; if not set, - * the password will not contain any digits. + * the password will not contain any digits. * - [PasswordGenerator.UPPERS]: If set, the password will contain at least one uppercase letter; - * if not set, the password will not contain any uppercase letters. + * if not set, the password will not contain any uppercase letters. * - [PasswordGenerator.LOWERS]: If set, the password will contain at least one lowercase letter; - * if not set, the password will not contain any lowercase letters. + * if not set, the password will not contain any lowercase letters. * - [PasswordGenerator.SYMBOLS]: If set, the password will contain at least one symbol; if not - * set, the password will not contain any symbols. + * set, the password will not contain any symbols. * - [PasswordGenerator.NO_AMBIGUOUS]: If set, the password will not contain any ambiguous - * characters. + * characters. */ fun generate(targetLength: Int, pwFlags: Int): String? { val bank = diff --git a/passgen/random/src/main/kotlin/app/passwordstore/passgen/random/RandomPhonemesGenerator.kt b/passgen/random/src/main/kotlin/app/passwordstore/passgen/random/RandomPhonemesGenerator.kt index 7b62ea4b..8ca196f7 100644 --- a/passgen/random/src/main/kotlin/app/passwordstore/passgen/random/RandomPhonemesGenerator.kt +++ b/passgen/random/src/main/kotlin/app/passwordstore/passgen/random/RandomPhonemesGenerator.kt @@ -69,18 +69,17 @@ internal object RandomPhonemesGenerator { /** * Generates a random human-readable password of length [targetLength], taking the following flags * in [pwFlags] into account, or fails to do so and returns null: - * * - [PasswordGenerator.DIGITS]: If set, the password will contain at least one digit; if not set, - * the password will not contain any digits. + * the password will not contain any digits. * - [PasswordGenerator.UPPERS]: If set, the password will contain at least one uppercase letter; - * if not set, the password will not contain any uppercase letters. + * if not set, the password will not contain any uppercase letters. * - [PasswordGenerator.LOWERS]: If set, the password will contain at least one lowercase letter; - * if not set and [PasswordGenerator.UPPERS] is set, the password will not contain any lowercase - * characters; if both are not set, an exception is thrown. + * if not set and [PasswordGenerator.UPPERS] is set, the password will not contain any lowercase + * characters; if both are not set, an exception is thrown. * - [PasswordGenerator.SYMBOLS]: If set, the password will contain at least one symbol; if not - * set, the password will not contain any symbols. + * set, the password will not contain any symbols. * - [PasswordGenerator.NO_AMBIGUOUS]: If set, the password will not contain any ambiguous - * characters. + * characters. */ fun generate(targetLength: Int, pwFlags: Int): String? { require(pwFlags hasFlag PasswordGenerator.UPPERS || pwFlags hasFlag PasswordGenerator.LOWERS) |