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

dev.samstevens.totp.qr.QrDataFactory Maven / Gradle / Ivy

Go to download

A library to help implement time-based one time passwords to enable MFA.

There is a newer version: 1.7.1
Show newest version
package dev.samstevens.totp.qr;

import dev.samstevens.totp.code.HashingAlgorithm;

public class QrDataFactory {

    private HashingAlgorithm defaultAlgorithm;
    private int defaultDigits;
    private int defaultTimePeriod;

    public QrDataFactory(HashingAlgorithm defaultAlgorithm, int defaultDigits, int defaultTimePeriod) {
        this.defaultAlgorithm = defaultAlgorithm;
        this.defaultDigits = defaultDigits;
        this.defaultTimePeriod = defaultTimePeriod;
    }

    public QrData.Builder newBuilder() {
        return new QrData.Builder()
            .algorithm(defaultAlgorithm)
            .digits(defaultDigits)
            .period(defaultTimePeriod);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy