diff options
author | Miles Breslin <finalbrez@gmail.com> | 2019-07-04 00:14:47 -0700 |
---|---|---|
committer | Harsh Shandilya <msfjarvis@gmail.com> | 2019-07-04 12:44:47 +0530 |
commit | 2e8fe06b2bbe42009820fd191b3ce740b9cd90ca (patch) | |
tree | b1bf8abf8849ac2cd693ec1403dfb9de4bd6bbe4 | |
parent | 143a24efc636d239e9a64835f171cb6e2ac12b85 (diff) |
Allow alternate totp format (#523)
Fixes #495
-rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/PasswordEntry.kt | 3 |
1 files changed, 3 insertions, 0 deletions
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 } |