OathUriParser

Utility class for parsing OATH URIs.

Functions

Link copied to clipboard
suspend fun format(credential: OathCredential): String

Format an OathCredential into a URI string.

Link copied to clipboard
suspend fun parse(uri: String): OathCredential

Parse an OATH URI string into an OathCredential. Format: otpauth://totp/Issuer:AccountName?secret=SECRET&issuer=Issuer&algorithm=SHA1&digits=6&period=30 Format: otpauth://hotp/Issuer:AccountName?secret=SECRET&issuer=Issuer&algorithm=SHA1&digits=6&counter=0