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

dev.samstevens.totp.qr.QrGenerator 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.exceptions.QrGenerationException;

public interface QrGenerator {
    /**
     * @return The mime type of the image that the generator generates, e.g. image/png
     */
    String getImageMimeType();

    /**
     * @param data The QrData object to encode in the generated image.
     * @return The raw image data as a byte array.
     * @throws QrGenerationException thrown if image generation fails for any reason.
     */
    byte[] generate(QrData data) throws QrGenerationException;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy