From 2d3d6707e83b42d675b9c12f96c6c0f7e2dd0f32 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Fri, 9 Dec 2022 18:20:02 +0530 Subject: chore(deps): upgrade ktfmt to 0.42 --- .../passwordstore/passgen/random/RandomPasswordGenerator.kt | 11 +++++------ .../passwordstore/passgen/random/RandomPhonemesGenerator.kt | 13 ++++++------- 2 files changed, 11 insertions(+), 13 deletions(-) (limited to 'passgen/random') 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) -- cgit v1.2.3