aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/crypto/DecryptActivity.kt2
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/git/config/SshApiSessionFactory.java4
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/utils/Otp.kt1
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/utils/UriTotpFinder.kt1
4 files changed, 4 insertions, 4 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/crypto/DecryptActivity.kt b/app/src/main/java/com/zeapo/pwdstore/crypto/DecryptActivity.kt
index 3c31a518..b48420fb 100644
--- a/app/src/main/java/com/zeapo/pwdstore/crypto/DecryptActivity.kt
+++ b/app/src/main/java/com/zeapo/pwdstore/crypto/DecryptActivity.kt
@@ -20,7 +20,6 @@ import com.github.ajalt.timberkt.e
import com.zeapo.pwdstore.R
import com.zeapo.pwdstore.databinding.DecryptLayoutBinding
import com.zeapo.pwdstore.model.PasswordEntry
-import com.zeapo.pwdstore.utils.Otp
import com.zeapo.pwdstore.utils.PreferenceKeys
import com.zeapo.pwdstore.utils.viewBinding
import kotlinx.coroutines.Dispatchers
@@ -32,7 +31,6 @@ import me.msfjarvis.openpgpktx.util.OpenPgpServiceConnection
import org.openintents.openpgp.IOpenPgpService2
import java.io.ByteArrayOutputStream
import java.io.File
-import java.util.Date
import kotlin.time.ExperimentalTime
import kotlin.time.seconds
diff --git a/app/src/main/java/com/zeapo/pwdstore/git/config/SshApiSessionFactory.java b/app/src/main/java/com/zeapo/pwdstore/git/config/SshApiSessionFactory.java
index 5ad12ef8..5a51d28a 100644
--- a/app/src/main/java/com/zeapo/pwdstore/git/config/SshApiSessionFactory.java
+++ b/app/src/main/java/com/zeapo/pwdstore/git/config/SshApiSessionFactory.java
@@ -110,11 +110,11 @@ public class SshApiSessionFactory extends JschConfigSessionFactory {
*/
public static class IdentityBuilder {
private final SshAuthenticationConnection connection;
+ private final BaseGitActivity callingActivity;
+ private final SharedPreferences settings;
private SshAuthenticationApi api;
private String keyId, description, alg;
private byte[] publicKey;
- private final BaseGitActivity callingActivity;
- private final SharedPreferences settings;
/**
* Construct a new IdentityBuilder
diff --git a/app/src/main/java/com/zeapo/pwdstore/utils/Otp.kt b/app/src/main/java/com/zeapo/pwdstore/utils/Otp.kt
index b95b9902..ace09bd2 100644
--- a/app/src/main/java/com/zeapo/pwdstore/utils/Otp.kt
+++ b/app/src/main/java/com/zeapo/pwdstore/utils/Otp.kt
@@ -18,6 +18,7 @@ import kotlin.experimental.and
object Otp {
private val BASE_32 = Base32()
private val STEAM_ALPHABET = "23456789BCDFGHJKMNPQRTVWXY".toCharArray()
+
init {
check(STEAM_ALPHABET.size == 26)
}
diff --git a/app/src/main/java/com/zeapo/pwdstore/utils/UriTotpFinder.kt b/app/src/main/java/com/zeapo/pwdstore/utils/UriTotpFinder.kt
index faa349d1..57c8f580 100644
--- a/app/src/main/java/com/zeapo/pwdstore/utils/UriTotpFinder.kt
+++ b/app/src/main/java/com/zeapo/pwdstore/utils/UriTotpFinder.kt
@@ -11,6 +11,7 @@ import android.net.Uri
* [Uri] backed TOTP URL parser.
*/
class UriTotpFinder : TotpFinder {
+
override fun findSecret(content: String): String? {
content.split("\n".toRegex()).forEach { line ->
if (line.startsWith("otpauth://totp/")) {