Uses of Class
io.github.pratiyush.totp.TOTPException
Packages that use TOTPException
Package
Description
Production-Ready TOTP Library - Null Safety Declaration.
Internal implementation classes for the TOTP library.
-
Uses of TOTPException in io.github.pratiyush.totp
Methods in io.github.pratiyush.totp that return TOTPExceptionModifier and TypeMethodDescriptionstatic TOTPExceptionCreates an exception for HMAC errors.static TOTPExceptionTOTPException.internalError(String message, Throwable cause) Creates an exception for internal errors.static TOTPExceptionTOTPException.invalidCode(String reason) Creates an exception for invalid codes.static TOTPExceptionTOTPException.invalidConfig(String reason) Creates an exception for invalid configuration.static TOTPExceptionTOTPException.invalidSecret(String reason) Creates an exception for invalid secrets.static TOTPExceptionTOTPException.qrGenerationError(Throwable cause) Creates an exception for QR generation errors.Methods in io.github.pratiyush.totp that throw TOTPExceptionModifier and TypeMethodDescriptionstatic StringQRCodeGenerator.buildOtpauthUri(String secret, String account, String issuer) Builds an otpauth URI with default configuration.static StringQRCodeGenerator.buildOtpauthUri(String secret, String account, String issuer, TOTPConfig config) Builds an otpauth URI for TOTP.Generates a TOTP code for the current time.TOTP.generateAt(String base32Secret, Instant instant) Generates a TOTP code for a specific instant.static StringQRCodeGenerator.generateBase64(String secret, String account, String issuer, int size) Generates a QR code as Base64 encoded PNG.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 StringQRCodeGenerator.generateDataUri(String secret, String account, String issuer, int size) Generates a data URI for embedding in HTML.TOTP.generateForCounter(String base32Secret, long counter) Generates a TOTP code for a specific counter value.static BufferedImageQRCodeGenerator.generateImage(String secret, String account, String issuer, int size) Generates a QR code image.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) Saves a QR code to a file.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.booleanVerifies a TOTP code.booleanVerifies a TOTP code with user-specific replay protection.TOTP.verifyWithDetails(String base32Secret, String code) Verifies a code and returns detailed result.static voidQRCodeGenerator.writeTo(String secret, String account, String issuer, OutputStream out, String format, int size) Writes a QR code to an output stream. -
Uses of TOTPException in io.github.pratiyush.totp.internal
Methods in io.github.pratiyush.totp.internal that throw TOTPExceptionModifier and TypeMethodDescriptionstatic byte[]Computes HMAC using the specified algorithm.static byte[]Computes HMAC using the specified algorithm name.static byte[]Decodes a Base32 string to binary data.static 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 voidTOTPEngine.validateBase32Secret(String base32Secret) Validates a Base32 encoded secret.static voidTOTPEngine.validateSecret(byte[] secret) Validates that the secret meets minimum security requirements.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.