Compare commits
2 Commits
62cbe2de3b
...
8870703608
| Author | SHA1 | Date | |
|---|---|---|---|
|
8870703608
|
|||
|
25e6fcdeab
|
@@ -25,7 +25,7 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("com.infendro:otp:1.2.1")
|
||||
implementation("com.infendro:otp:1.2.2")
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -25,8 +25,7 @@ class HOTP(
|
||||
secret: UByteArray,
|
||||
counter: Long,
|
||||
): String {
|
||||
if (counter < 0)
|
||||
throw IllegalArgumentException()
|
||||
require(counter >= 0)
|
||||
|
||||
val hash = generateHash(secret, counter.toUByteArray())
|
||||
return otp(hash)
|
||||
|
||||
Reference in New Issue
Block a user