QGIS API Documentation 3.41.0-Master (45a0abf3bec)
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
QgsAuthCrypto Class Reference

Functions for hashing/checking master password and encrypt/decrypting data with password. More...

#include <qgsauthcrypto.h>

Static Public Member Functions

static const QString decrypt (const QString &pass, const QString &cipheriv, const QString &text)
 Decrypt data using master password.
 
static const QString encrypt (const QString &pass, const QString &cipheriv, const QString &text)
 Encrypt data using master password.
 
static bool isDisabled ()
 Whether QCA has the qca-ossl plugin, which a base run-time requirement.
 
static void passwordKeyHash (const QString &pass, QString *salt, QString *hash, QString *cipheriv=nullptr)
 Generate SHA256 hash for master password, with iterations and salt.
 
static bool verifyPasswordKeyHash (const QString &pass, const QString &salt, const QString &hash, QString *hashderived=nullptr)
 Verify existing master password hash to a re-generated one.
 

Detailed Description

Functions for hashing/checking master password and encrypt/decrypting data with password.

Note
not available in Python bindings

Definition at line 32 of file qgsauthcrypto.h.

Member Function Documentation

◆ decrypt()

const QString QgsAuthCrypto::decrypt ( const QString &  pass,
const QString &  cipheriv,
const QString &  text 
)
static

Decrypt data using master password.

Definition at line 53 of file qgsauthcrypto.cpp.

◆ encrypt()

const QString QgsAuthCrypto::encrypt ( const QString &  pass,
const QString &  cipheriv,
const QString &  text 
)
static

Encrypt data using master password.

Definition at line 45 of file qgsauthcrypto.cpp.

◆ isDisabled()

bool QgsAuthCrypto::isDisabled ( )
static

Whether QCA has the qca-ossl plugin, which a base run-time requirement.

Definition at line 35 of file qgsauthcrypto.cpp.

◆ passwordKeyHash()

void QgsAuthCrypto::passwordKeyHash ( const QString &  pass,
QString *  salt,
QString *  hash,
QString *  cipheriv = nullptr 
)
static

Generate SHA256 hash for master password, with iterations and salt.

Definition at line 68 of file qgsauthcrypto.cpp.

◆ verifyPasswordKeyHash()

bool QgsAuthCrypto::verifyPasswordKeyHash ( const QString &  pass,
const QString &  salt,
const QString &  hash,
QString *  hashderived = nullptr 
)
static

Verify existing master password hash to a re-generated one.

Definition at line 92 of file qgsauthcrypto.cpp.


The documentation for this class was generated from the following files: