diff options
| author | Joel Beckmeyer <joel@thebeckmeyers.xyz> | 2018-09-25 13:45:54 -0400 |
|---|---|---|
| committer | حسين <zidhussein@gmail.com> | 2018-09-25 18:45:54 +0100 |
| commit | eea0e68dda1eb7248c6d458f52baeedb318b466a (patch) | |
| tree | 73ff2b2f121b8db3097671f0e0639906edc2abea /app/src/androidTest/java/com/zeapo/pwdstore/OtpTest.java | |
| parent | ac889abdd3d71ffb7f064a384c375ec22e7734c4 (diff) | |
| download | HardenedPass-eea0e68dda1eb7248c6d458f52baeedb318b466a.tar.gz HardenedPass-eea0e68dda1eb7248c6d458f52baeedb318b466a.zip | |
Display HOTP code if password contains HOTP secret, unify HOTP and TOTP code (#413)
* Display HOTP code if password contains HOTP secret, unify HOTP and TOTP code
* Add ability to show HOTP instead of showing every decrypt
* Fix off by 1 error
* fix return intent logic so that edits and HOTP increments are properly committed
* fix linting errors
* Fix broken logic for case when a password is created
* add ability to choose if password entry will be updated on HOTP code calculation
Diffstat (limited to 'app/src/androidTest/java/com/zeapo/pwdstore/OtpTest.java')
| -rw-r--r-- | app/src/androidTest/java/com/zeapo/pwdstore/OtpTest.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/src/androidTest/java/com/zeapo/pwdstore/OtpTest.java b/app/src/androidTest/java/com/zeapo/pwdstore/OtpTest.java new file mode 100644 index 00000000..e48f1ab6 --- /dev/null +++ b/app/src/androidTest/java/com/zeapo/pwdstore/OtpTest.java @@ -0,0 +1,12 @@ +package com.zeapo.pwdstore; + +import com.zeapo.pwdstore.utils.Otp; + +import junit.framework.TestCase; + +public class OtpTest extends TestCase { + public void testOtp() { + String code = Otp.calculateCode("JBSWY3DPEHPK3PXP", 0L); + assertEquals("282760", code); + } +} |
