Fixed crash on pre-26 API due tu lack of java.time.Duration in dependent OTP lib
This commit is contained in:
parent
aeb18e0b7c
commit
033ca414f7
1 changed files with 2 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
||||||
package info.nightscout.androidaps.plugins.general.smsCommunicator.otp
|
package info.nightscout.androidaps.plugins.general.smsCommunicator.otp
|
||||||
|
|
||||||
import android.util.Base64
|
import android.util.Base64
|
||||||
import com.eatthepath.otp.TimeBasedOneTimePasswordGenerator
|
import com.eatthepath.otp.HmacOneTimePasswordGenerator
|
||||||
import com.google.common.io.BaseEncoding
|
import com.google.common.io.BaseEncoding
|
||||||
import info.nightscout.androidaps.Constants
|
import info.nightscout.androidaps.Constants
|
||||||
import info.nightscout.androidaps.R
|
import info.nightscout.androidaps.R
|
||||||
|
@ -23,7 +23,7 @@ class OneTimePassword @Inject constructor(
|
||||||
|
|
||||||
private var key: SecretKey? = null
|
private var key: SecretKey? = null
|
||||||
private var pin: String = ""
|
private var pin: String = ""
|
||||||
private val totp = TimeBasedOneTimePasswordGenerator()
|
private val totp = HmacOneTimePasswordGenerator()
|
||||||
|
|
||||||
init {
|
init {
|
||||||
instance = this
|
instance = this
|
||||||
|
|
Loading…
Reference in a new issue