From 2e8fe06b2bbe42009820fd191b3ce740b9cd90ca Mon Sep 17 00:00:00 2001 From: Miles Breslin Date: Thu, 4 Jul 2019 00:14:47 -0700 Subject: Allow alternate totp format (#523) Fixes #495 --- app/src/main/java/com/zeapo/pwdstore/PasswordEntry.kt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app') diff --git a/app/src/main/java/com/zeapo/pwdstore/PasswordEntry.kt b/app/src/main/java/com/zeapo/pwdstore/PasswordEntry.kt index 0fad38d7..52ab93d0 100644 --- a/app/src/main/java/com/zeapo/pwdstore/PasswordEntry.kt +++ b/app/src/main/java/com/zeapo/pwdstore/PasswordEntry.kt @@ -83,6 +83,9 @@ class PasswordEntry(private val content: String) { if (line.startsWith("otpauth://totp/")) { return Uri.parse(line).getQueryParameter("secret") } + if (line.toLowerCase().startsWith("totp:")) { + return line.split(": *".toRegex(), 2).toTypedArray()[1] + } } return null } -- cgit v1.2.3