Skip to content

Commit

Permalink
refactor: fix for KtLint report
Browse files Browse the repository at this point in the history
  • Loading branch information
joragua committed Dec 11, 2024
1 parent 06bfe20 commit 6ac1cd7
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,22 +53,22 @@ fun generatePassword(
val passwordChars = mutableListOf<Char>()

// Include the minimum number of digits established by the policy
repeat (minDigits) {
repeat(minDigits) {
passwordChars.add(charsetDigits[secureRandom.nextInt(charsetDigits.size)])
}

// Include the minimum number of lowercase chars established by the policy
repeat (minLowercaseCharacters) {
repeat(minLowercaseCharacters) {
passwordChars.add(charsetLowercase[secureRandom.nextInt(charsetLowercase.size)])
}

// Include the minimum number of uppercase chars established by the policy
repeat (minUppercaseCharacters) {
repeat(minUppercaseCharacters) {
passwordChars.add(charsetUppercase[secureRandom.nextInt(charsetUppercase.size)])
}

// Include the minimum number of special chars established by the policy
repeat (minSpecialCharacters) {
repeat(minSpecialCharacters) {
passwordChars.add(charsetSpecial[secureRandom.nextInt(charsetSpecial.size)])
}

Expand Down

0 comments on commit 6ac1cd7

Please sign in to comment.