aboutsummaryrefslogtreecommitdiff
path: root/format-common
diff options
context:
space:
mode:
Diffstat (limited to 'format-common')
-rw-r--r--format-common/api/format-common.api4
-rw-r--r--format-common/src/main/kotlin/dev/msfjarvis/aps/data/passfile/PasswordEntry.kt6
2 files changed, 10 insertions, 0 deletions
diff --git a/format-common/api/format-common.api b/format-common/api/format-common.api
index 88f5d330..d0caaf78 100644
--- a/format-common/api/format-common.api
+++ b/format-common/api/format-common.api
@@ -9,6 +9,10 @@ public final class dev/msfjarvis/aps/data/passfile/PasswordEntry {
public final fun hasTotp ()Z
}
+public abstract interface class dev/msfjarvis/aps/data/passfile/PasswordEntry$Factory {
+ public abstract fun create (Lkotlinx/coroutines/CoroutineScope;[B)Ldev/msfjarvis/aps/data/passfile/PasswordEntry;
+}
+
public class dev/msfjarvis/aps/util/time/UserClock : java/time/Clock {
public fun <init> ()V
public fun getZone ()Ljava/time/ZoneId;
diff --git a/format-common/src/main/kotlin/dev/msfjarvis/aps/data/passfile/PasswordEntry.kt b/format-common/src/main/kotlin/dev/msfjarvis/aps/data/passfile/PasswordEntry.kt
index efcc6078..408069a2 100644
--- a/format-common/src/main/kotlin/dev/msfjarvis/aps/data/passfile/PasswordEntry.kt
+++ b/format-common/src/main/kotlin/dev/msfjarvis/aps/data/passfile/PasswordEntry.kt
@@ -7,6 +7,7 @@ package dev.msfjarvis.aps.data.passfile
import com.github.michaelbull.result.mapBoth
import dagger.assisted.Assisted
+import dagger.assisted.AssistedFactory
import dagger.assisted.AssistedInject
import dev.msfjarvis.aps.util.time.UserClock
import dev.msfjarvis.aps.util.totp.Otp
@@ -197,6 +198,11 @@ constructor(
}
}
+ @AssistedFactory
+ public interface Factory {
+ public fun create(scope: CoroutineScope, bytes: ByteArray): PasswordEntry
+ }
+
internal companion object {
private const val EXTRA_CONTENT = "Extra Content"