OtpQRScanResult

public final class OtpQRScanResult : QRScanResultProtocol

The OtpQRScanResult handles one-time password data scanned from a QR code.

  • The type of the QR scanned. Value must be either HOTP or TOTP.

    Declaration

    Swift

    public fileprivate(set) var type: String
  • The name of the issuer providing the service.

    Declaration

    Swift

    public fileprivate(set) var issuer: String?
  • The secret value encoded in Base32.

    Declaration

    Swift

    public fileprivate(set) var secret: String
  • The username associated with the service.

    Declaration

    Swift

    public fileprivate(set) var username: String?
  • The algorithm used to calculate the one-time password. The default is HmacAlgorithm.SHA1.

    Declaration

    Swift

    public fileprivate(set) var algorithm: HmacAlgorithm = HmacAlgorithm.sha1
  • The length of the one-time password to be displayed. The default is 6.

    Declaration

    Swift

    public fileprivate(set) var digits: Int = 6
  • The counter is required for use with HOTP. It will set the initial counter value.

    Declaration

    Swift

    public fileprivate(set) var counter: Int = 1
  • The period a TOTP code will be valid for, in seconds. The default value is 30.

    Declaration

    Swift

    public fileprivate(set) var period: Int = 30