From 033ca414f74b0c338e454eb3f8a80ce719abfc83 Mon Sep 17 00:00:00 2001 From: Dominik Dzienia Date: Sun, 5 Apr 2020 01:37:05 +0200 Subject: [PATCH] Fixed crash on pre-26 API due tu lack of java.time.Duration in dependent OTP lib --- .../plugins/general/smsCommunicator/otp/OneTimePassword.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/smsCommunicator/otp/OneTimePassword.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/smsCommunicator/otp/OneTimePassword.kt index a3e1e9a1f1..2f49ae25ef 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/smsCommunicator/otp/OneTimePassword.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/smsCommunicator/otp/OneTimePassword.kt @@ -1,7 +1,7 @@ package info.nightscout.androidaps.plugins.general.smsCommunicator.otp import android.util.Base64 -import com.eatthepath.otp.TimeBasedOneTimePasswordGenerator +import com.eatthepath.otp.HmacOneTimePasswordGenerator import com.google.common.io.BaseEncoding import info.nightscout.androidaps.Constants import info.nightscout.androidaps.R @@ -23,7 +23,7 @@ class OneTimePassword @Inject constructor( private var key: SecretKey? = null private var pin: String = "" - private val totp = TimeBasedOneTimePasswordGenerator() + private val totp = HmacOneTimePasswordGenerator() init { instance = this