summaryrefslogtreecommitdiff
path: root/passgen
diff options
context:
space:
mode:
Diffstat (limited to 'passgen')
-rw-r--r--passgen/diceware/src/main/kotlin/app/passwordstore/passgen/diceware/DicewarePassphraseGenerator.kt5
-rw-r--r--passgen/diceware/src/main/kotlin/app/passwordstore/passgen/diceware/Die.kt5
-rw-r--r--passgen/diceware/src/test/kotlin/app/passwordstore/passgen/diceware/DicewarePassphraseGeneratorTest.kt6
-rw-r--r--passgen/random/src/main/kotlin/app/passwordstore/passgen/random/PasswordOption.kt2
-rw-r--r--passgen/random/src/main/kotlin/app/passwordstore/passgen/random/RandomPhonemesGenerator.kt2
5 files changed, 5 insertions, 15 deletions
diff --git a/passgen/diceware/src/main/kotlin/app/passwordstore/passgen/diceware/DicewarePassphraseGenerator.kt b/passgen/diceware/src/main/kotlin/app/passwordstore/passgen/diceware/DicewarePassphraseGenerator.kt
index 841eb31b..36d7e600 100644
--- a/passgen/diceware/src/main/kotlin/app/passwordstore/passgen/diceware/DicewarePassphraseGenerator.kt
+++ b/passgen/diceware/src/main/kotlin/app/passwordstore/passgen/diceware/DicewarePassphraseGenerator.kt
@@ -14,10 +14,7 @@ import javax.inject.Inject
*/
public class DicewarePassphraseGenerator
@Inject
-constructor(
- private val die: Die,
- wordList: InputStream,
-) {
+constructor(private val die: Die, wordList: InputStream) {
private val wordMap = WordListParser.parse(wordList)
diff --git a/passgen/diceware/src/main/kotlin/app/passwordstore/passgen/diceware/Die.kt b/passgen/diceware/src/main/kotlin/app/passwordstore/passgen/diceware/Die.kt
index e3db4b80..c93fc40f 100644
--- a/passgen/diceware/src/main/kotlin/app/passwordstore/passgen/diceware/Die.kt
+++ b/passgen/diceware/src/main/kotlin/app/passwordstore/passgen/diceware/Die.kt
@@ -10,10 +10,7 @@ import javax.inject.Inject
/** Basic implementation of a die with configurable number of sides. */
public class Die
@Inject
-constructor(
- private val sides: Int,
- private val random: RandomIntGenerator,
-) {
+constructor(private val sides: Int, private val random: RandomIntGenerator) {
/** Roll the die to return a single number. */
public fun roll(): Int {
diff --git a/passgen/diceware/src/test/kotlin/app/passwordstore/passgen/diceware/DicewarePassphraseGeneratorTest.kt b/passgen/diceware/src/test/kotlin/app/passwordstore/passgen/diceware/DicewarePassphraseGeneratorTest.kt
index c12161c2..976e0345 100644
--- a/passgen/diceware/src/test/kotlin/app/passwordstore/passgen/diceware/DicewarePassphraseGeneratorTest.kt
+++ b/passgen/diceware/src/test/kotlin/app/passwordstore/passgen/diceware/DicewarePassphraseGeneratorTest.kt
@@ -19,11 +19,7 @@ class DicewarePassphraseGeneratorTest {
fun generatePassphrase() {
val die = Die(6, intGenerator)
- val generator =
- DicewarePassphraseGenerator(
- die,
- WordListParserTest.getDefaultWordList(),
- )
+ val generator = DicewarePassphraseGenerator(die, WordListParserTest.getDefaultWordList())
assertEquals("salvation_cozily_croon_trustee_fidgety", generator.generatePassphrase(5, '_'))
}
diff --git a/passgen/random/src/main/kotlin/app/passwordstore/passgen/random/PasswordOption.kt b/passgen/random/src/main/kotlin/app/passwordstore/passgen/random/PasswordOption.kt
index ead3b02a..860e3573 100644
--- a/passgen/random/src/main/kotlin/app/passwordstore/passgen/random/PasswordOption.kt
+++ b/passgen/random/src/main/kotlin/app/passwordstore/passgen/random/PasswordOption.kt
@@ -6,5 +6,5 @@ public enum class PasswordOption(public val key: String) {
NoAmbiguousCharacters("B"),
FullyRandom("s"),
AtLeastOneSymbol("y"),
- NoLowercaseLetters("L")
+ NoLowercaseLetters("L"),
}
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 8ca196f7..b23acb5e 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
@@ -55,7 +55,7 @@ internal object RandomPhonemesGenerator {
Element("w", CONSONANT),
Element("x", CONSONANT),
Element("y", CONSONANT),
- Element("z", CONSONANT)
+ Element("z", CONSONANT),
)
private class Element(str: String, val flags: Int) {