QtPass 2.0.0
Developer documentation
Loading...
Searching...
No Matches
Totp::Settings Struct Reference

Validated TOTP parameters. Only Totp::parse() produces one. More...

#include <totp.h>

Public Attributes

QByteArray key
 Decoded shared secret; never empty.
QString base32Key
 Sanitized base32 secret, for re-serialisation.
Algorithm algorithm {Algorithm::Sha1}
 HMAC hash function.
Encoder encoder {Encoder::Base10}
 Digit encoding.
uint digits {DEFAULT_DIGITS}
 Code length, MIN_DIGITS..MAX_DIGITS.
uint step {DEFAULT_STEP}
 Period in seconds, 1..MAX_STEP.
QString label
 otpauth label; may be empty.
QString issuer
QList< QPair< QString, QString > > extraParams
QString fragment

Detailed Description

Validated TOTP parameters. Only Totp::parse() produces one.

Definition at line 74 of file totp.h.

Member Data Documentation

◆ algorithm

Algorithm Totp::Settings::algorithm {Algorithm::Sha1}

HMAC hash function.

Definition at line 77 of file totp.h.

◆ base32Key

QString Totp::Settings::base32Key

Sanitized base32 secret, for re-serialisation.

Definition at line 76 of file totp.h.

◆ digits

uint Totp::Settings::digits {DEFAULT_DIGITS}

Code length, MIN_DIGITS..MAX_DIGITS.

Definition at line 79 of file totp.h.

◆ encoder

Encoder Totp::Settings::encoder {Encoder::Base10}

Digit encoding.

Definition at line 78 of file totp.h.

◆ extraParams

QList<QPair<QString, QString> > Totp::Settings::extraParams

Query parameters the parser does not model, kept verbatim so toUri() can put them back instead of silently dropping them.

Definition at line 85 of file totp.h.

◆ fragment

QString Totp::Settings::fragment

What followed a # in the URI, as written: recovery codes or a remark noted behind it. Kept so toUri() puts it back; a canonicalised URI used to lose it on every save.

Definition at line 89 of file totp.h.

◆ issuer

QString Totp::Settings::issuer

otpauth issuer; may be empty.

Definition at line 82 of file totp.h.

◆ key

QByteArray Totp::Settings::key

Decoded shared secret; never empty.

Definition at line 75 of file totp.h.

◆ label

QString Totp::Settings::label

otpauth label; may be empty.

Definition at line 81 of file totp.h.

◆ step

uint Totp::Settings::step {DEFAULT_STEP}

Period in seconds, 1..MAX_STEP.

Definition at line 80 of file totp.h.


The documentation for this struct was generated from the following file: