Fixed crash on pre-26 API due tu lack of java.time.Duration in dependent OTP lib

This commit is contained in:
Dominik Dzienia 2020-04-05 01:37:05 +02:00
parent aeb18e0b7c
commit 033ca414f7

View file

@ -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