Uses of Class
io.github.pratiyush.totp.TOTPConfig
Packages that use TOTPConfig
Package
Description
Production-Ready TOTP Library - Null Safety Declaration.
Internal implementation classes for the TOTP library.
-
Uses of TOTPConfig in io.github.pratiyush.totp
Methods in io.github.pratiyush.totp that return TOTPConfigModifier and TypeMethodDescriptionTOTPConfig.Builder.build()Builds the configuration.static TOTPConfigTOTPConfig.defaultConfig()Returns the default configuration (Google Authenticator compatible).TOTP.getConfig()Returns the configuration.static TOTPConfigTOTPConfig.highSecurityConfig()Returns a high-security configuration with SHA-512 and 8 digits.static TOTPConfigTOTPConfig.sha256Config()Returns a configuration optimized for SHA-256.Methods in io.github.pratiyush.totp with parameters of type TOTPConfigModifier and TypeMethodDescriptionstatic StringQRCodeGenerator.buildOtpauthUri(String secret, String account, String issuer, TOTPConfig config) Builds an otpauth URI for TOTP.TOTP.Builder.config(TOTPConfig config) Sets the TOTP configuration.static InMemoryReplayGuardInMemoryReplayGuard.forConfig(TOTPConfig config) Creates a replay guard configured for a specific TOTP configuration.static StringQRCodeGenerator.generateBase64(String secret, String account, String issuer, int size, TOTPConfig config) Generates a QR code as Base64 encoded PNG with custom configuration.static BufferedImageQRCodeGenerator.generateImage(String secret, String account, String issuer, int size, TOTPConfig config) Generates a QR code image with custom configuration.static voidQRCodeGenerator.saveToFile(String secret, String account, String issuer, Path path, int size, TOTPConfig config) Saves a QR code to a file with custom configuration. -
Uses of TOTPConfig in io.github.pratiyush.totp.internal
Methods in io.github.pratiyush.totp.internal with parameters of type TOTPConfigModifier and TypeMethodDescriptionstatic StringTOTPEngine.generateCode(byte[] secret, long counter, TOTPConfig config) Generates a TOTP code for the given secret and counter.static StringTOTPEngine.generateCode(byte[] secret, TOTPConfig config, TOTPClock clock) Generates a TOTP code for the current time.static StringTOTPEngine.generateCodeAt(byte[] secret, Instant instant, TOTPConfig config) Generates a TOTP code for a specific instant.static booleanTOTPEngine.verifyCode(byte[] secret, String code, TOTPConfig config, TOTPClock clock) Verifies a TOTP code using constant-time comparison.static IntegerTOTPEngine.verifyCodeWithOffset(byte[] secret, String code, TOTPConfig config, TOTPClock clock) Verifies a code and returns the matching counter offset if valid.