aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/com/zeapo
diff options
context:
space:
mode:
authorFabian Henneke <FabianHenneke@users.noreply.github.com>2020-07-01 12:51:05 +0200
committerGitHub <noreply@github.com>2020-07-01 12:51:05 +0200
commitc5a93b8b8168eead37f3f93a8e8378211c1d240b (patch)
treea42ab5481861a7aa7222b67b6f71c6f7cb5457e4 /app/src/main/java/com/zeapo
parent83ba0a3ed56661c17b06b11fcb91c72b94f5974b (diff)
Run a treewide reformat (#908)
Co-authored-by: Harsh Shandilya <msfjarvis@gmail.com>
Diffstat (limited to 'app/src/main/java/com/zeapo')
-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/")) {