isValid

fun isValid(code: String, timestamp: Long = System.currentTimeMillis()): Boolean

Validates the given code.

Parameters

code

the code calculated from the challenge to validate.

timestamp

the used challenge for the code. The default value is the current system time from System.currentTimeMillis.


fun isValid(code: String, date: Date): Boolean
fun isValid(code: String, instant: Instant): Boolean

Convenience method for isValid.