QtPass 2.0.0
Developer documentation
Loading...
Searching...
No Matches
filecontent.cpp File Reference

Implements FileContent::parse() as a single streaming pass over the entry, with the field cap, the display-line cap and the OTP candidate search, plus the cached secret-field-name matcher. More...

#include "filecontent.h"
#include <QRegularExpression>
#include <QCoreApplication>
#include <QStringTokenizer>
#include <algorithm>
#include <limits>
#include <utility>
Include dependency graph for filecontent.cpp:

Go to the source code of this file.

Functions

static auto isOtpUri (const QString &value) -> bool
 Shorthand for the public FileContent::isOtpUriValue.
static auto isLineHidden (const QString &line) -> bool
 Whether a body line carries a TOTP shared secret and must stay out of the parsed display: a bare otpauth:// line, an OTP:/TOTP: field, or any field whose value is an otpauth URI. "Display the file's content as-is" bypasses this filter and shows the entry raw.

Detailed Description

Implements FileContent::parse() as a single streaming pass over the entry, with the field cap, the display-line cap and the OTP candidate search, plus the cached secret-field-name matcher.

Definition in file filecontent.cpp.

Function Documentation

◆ isLineHidden()

auto isLineHidden ( const QString & line) -> bool
static

Whether a body line carries a TOTP shared secret and must stay out of the parsed display: a bare otpauth:// line, an OTP:/TOTP: field, or any field whose value is an otpauth URI. "Display the file's content as-is" bypasses this filter and shows the entry raw.

Parameters
lineOne line of the entry body.
Returns
true when the line is kept out of getRemainingDataForDisplay().

Definition at line 37 of file filecontent.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isOtpUri()

auto isOtpUri ( const QString & value) -> bool
static

Shorthand for the public FileContent::isOtpUriValue.

Parameters
valueA line or field value.
Returns
true when it is an otpauth:// URI.

Definition at line 25 of file filecontent.cpp.

Here is the call graph for this function:
Here is the caller graph for this function: