All Downloads are FREE. Search and download functionalities are using the official Maven repository.

dev.turingcomplete.kotlinonetimepassword.TimeBasedOneTimePasswordConfig.kt Maven / Gradle / Ivy

Go to download

A Kotlin one-time password library to generate "Google Authenticator", "Time-based One-time Password" (TOTP) and "HMAC-based One-time Password" (HOTP) codes based on RFC 4226 and 6238.

There is a newer version: 2.4.1
Show newest version
package dev.turingcomplete.kotlinonetimepassword

import java.util.concurrent.TimeUnit

/**
 * The configuration for the [TimeBasedOneTimePasswordGenerator].
 *
 * @property timeStep represents together with the [timeStepUnit] parameter the
 *                    time range in which the challenge is valid (e.g. 30 seconds).
 * @property timeStepUnit see [timeStep]
 * @property codeDigits see documentation in [HmacOneTimePasswordConfig].
 * @property hmacAlgorithm see documentation in [HmacOneTimePasswordConfig].
 */
open class TimeBasedOneTimePasswordConfig(val timeStep: Long,
                                          val timeStepUnit: TimeUnit,
                                          codeDigits: Int,
                                          hmacAlgorithm: HmacAlgorithm): HmacOneTimePasswordConfig(codeDigits, hmacAlgorithm)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy