// qcryptographichash.sip generated by MetaSIP
//
// This file is part of the QtCore Python extension module.
//
// Copyright (c) 2026 Riverbank Computing Limited <info@riverbankcomputing.com>
// 
// This file is part of PyQt6.
// 
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file.  Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
// 
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license.  For more information contact
// info@riverbankcomputing.com.
// 
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.


class QCryptographicHash
{
%TypeHeaderCode
#include <qcryptographichash.h>
%End

public:
    enum Algorithm
    {
        Md4,
        Md5,
        Sha1,
        Sha224,
        Sha256,
        Sha384,
        Sha512,
        Sha3_224,
        Sha3_256,
        Sha3_384,
        Sha3_512,
        Keccak_224,
        Keccak_256,
        Keccak_384,
        Keccak_512,
        Blake2b_160,
        Blake2b_256,
        Blake2b_384,
        Blake2b_512,
        Blake2s_128,
        Blake2s_160,
        Blake2s_224,
        Blake2s_256,
    };

    explicit QCryptographicHash(QCryptographicHash::Algorithm method);
    ~QCryptographicHash();
    void reset();
%If (Qt_6_3_0 -)
    void addData(QByteArrayView data);
%End
%If (- Qt_6_3_0)
    void addData(const QByteArray &data);
%End
    void addData(const char *data /Array/, qsizetype length /ArraySize/);
    bool addData(QIODevice *device);
    QByteArray result() const;
%If (Qt_6_3_0 -)
    QByteArrayView resultView() const;
%End
%If (Qt_6_3_0 -)
    static QByteArray hash(QByteArrayView data, QCryptographicHash::Algorithm method);
%End
%If (- Qt_6_3_0)
    static QByteArray hash(const QByteArray &data, QCryptographicHash::Algorithm method);
%End
    static int hashLength(QCryptographicHash::Algorithm method);
%If (Qt_6_5_0 -)
    void swap(QCryptographicHash &other /Constrained/);
%End
%If (Qt_6_5_0 -)
    QCryptographicHash::Algorithm algorithm() const;
%End
%If (Qt_6_5_0 -)
    static bool supportsAlgorithm(QCryptographicHash::Algorithm method);
%End

private:
    QCryptographicHash(const QCryptographicHash &);
};
