This file is indexed.

/usr/include/qgis/qgsauthcrypto.h is in libqgis-dev 2.18.17+dfsg-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/***************************************************************************
    qgsauthcrypto.h
    ---------------------
    begin                : October 5, 2014
    copyright            : (C) 2014 by Boundless Spatial, Inc. USA
    author               : Larry Shaffer
    email                : lshaffer at boundlessgeo dot com
 ***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef QGSAUTHCRYPTO_H
#define QGSAUTHCRYPTO_H

#include <QFile>
#include <QString>

/** \ingroup core
 * Funtions for hashing/checking master password and encrypt/decrypting data with password
 * \since 2.8
 * \note not available in Python bindings
 */
class CORE_EXPORT QgsAuthCrypto
{

  public:
    /** Whether QCA has the qca-ossl plugin, which a base run-time requirement */
    static bool isDisabled();

    /** Encrypt data using master password */
    static const QString encrypt( const QString& pass, const QString& cipheriv, const QString& text );

    /** Decrypt data using master password */
    static const QString decrypt( const QString& pass, const QString& cipheriv, const QString& text );

    /** Generate SHA256 hash for master password, with iterations and salt */
    static void passwordKeyHash( const QString &pass,
                                 QString *salt,
                                 QString *hash,
                                 QString *cipheriv = nullptr );

    /** Verify existing master password hash to a re-generated one */
    static bool verifyPasswordKeyHash( const QString& pass,
                                       const QString& salt,
                                       const QString& hash,
                                       QString *hashderived = nullptr );

  private:
    static QString encryptdecrypt( const QString& passstr,
                                   const QString& cipheriv,
                                   const QString& textstr,
                                   bool encrypt );
};

#endif  // QGSAUTHCRYPTO_H