aboutsummaryrefslogtreecommitdiff
path: root/passgen/random/src
diff options
context:
space:
mode:
Diffstat (limited to 'passgen/random/src')
-rw-r--r--passgen/random/src/main/kotlin/app/passwordstore/passgen/random/PasswordGenerator.kt3
1 files changed, 2 insertions, 1 deletions
diff --git a/passgen/random/src/main/kotlin/app/passwordstore/passgen/random/PasswordGenerator.kt b/passgen/random/src/main/kotlin/app/passwordstore/passgen/random/PasswordGenerator.kt
index 4f08904d..faf0ad4c 100644
--- a/passgen/random/src/main/kotlin/app/passwordstore/passgen/random/PasswordGenerator.kt
+++ b/passgen/random/src/main/kotlin/app/passwordstore/passgen/random/PasswordGenerator.kt
@@ -7,6 +7,7 @@ package app.passwordstore.passgen.random
import app.passwordstore.passgen.random.util.clearFlag
import app.passwordstore.passgen.random.util.hasFlag
+@OptIn(ExperimentalStdlibApi::class)
public object PasswordGenerator {
public const val DEFAULT_LENGTH: Int = 16
@@ -39,7 +40,7 @@ public object PasswordGenerator {
var phonemes = true
var pwgenFlags = DIGITS or UPPERS or LOWERS
- for (option in PasswordOption.values()) {
+ for (option in PasswordOption.entries) {
if (option in passwordOptions) {
when (option) {
PasswordOption.NoDigits -> pwgenFlags = pwgenFlags.clearFlag(DIGITS)