Otp Auth Uri Builder
A builder to create an OTP Auth URI as defined in Key Uri Format. This URI contains all necessary information for a TOTP/HOTP client to set up the code generation.
This URI can be used, for example, to be encoded into a QR code.
An example OTP Auth URI would be:
otpauth://totp/Company:John@company.com?secret=SGWY3DPESRKFPHH&issuer=Company&digits=8&algorithm=SHA1Use the factory methods forTotp/TimeBasedOneTimePasswordGenerator.otpAuthUriBuilder or forHotp/HmacOneTimePasswordGenerator.otpAuthUriBuilder to create a/an TOTP/HOTP specific instance of an OtpAuthUriBuilder.
See also
Parameters
if set to true, the Base32 padding character = will be removed from the secret URI parameter (e.g., MFQWC=== will be transformed to MFQWC.), this is required by the specification.
Constructors
Types
A builder for an HOTP OTP Auth URI.
A builder for a TOTP OTP Auth URI.
Functions
Sets the algorithm query parameter, which is the uppercase name of the HMAC algorithms defined in HmacAlgorithm.
Builds the final OTP Auth URI as a ByteArray.
Builds the final OTP Auth URI as a String.
Builds the final OTP Auth URI as a URI.
Sets the label path part of the URI, which consist of an account name and an optional issuer. Both values will be separated by a colon (:), which can be URL encoded by setting the parameter encodeSeparator.