/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.15.3
 *
 * 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.
 */

#include "sipAPIQtCore.h"

#line 26 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qcryptographichash.sip"
#include <qcryptographichash.h>
#line 29 "/build/pyqt6/src/pyqt6-6.11.0/build/QtCore/sipQtCoreQCryptographicHash.cpp"

#line 30 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qbytearray.sip"
#include <qbytearray.h>
#line 33 "/build/pyqt6/src/pyqt6-6.11.0/build/QtCore/sipQtCoreQCryptographicHash.cpp"
#line 24 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qbytearrayview.sip"
#include <qbytearrayview.h>
#line 36 "/build/pyqt6/src/pyqt6-6.11.0/build/QtCore/sipQtCoreQCryptographicHash.cpp"
#line 26 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qiodevice.sip"
#include <qiodevice.h>
#line 39 "/build/pyqt6/src/pyqt6-6.11.0/build/QtCore/sipQtCoreQCryptographicHash.cpp"


PyDoc_STRVAR(doc_QCryptographicHash_reset, "reset(self)");

extern "C" {static PyObject *meth_QCryptographicHash_reset(PyObject *, PyObject *);}
static PyObject *meth_QCryptographicHash_reset(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::QCryptographicHash *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QCryptographicHash, &sipCpp))
        {
            sipCpp->reset();

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QCryptographicHash, sipName_reset, doc_QCryptographicHash_reset);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QCryptographicHash_addData, "addData(self, data: QByteArray|bytes|bytearray|memoryview)\n"
"addData(self, data: PyQt6.sip.array[bytes])\n"
"addData(self, device: QIODevice|None) -> bool");

extern "C" {static PyObject *meth_QCryptographicHash_addData(PyObject *, PyObject *);}
static PyObject *meth_QCryptographicHash_addData(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::QByteArrayView* a0;
        int a0State = 0;
        void *a0UserState = SIP_NULLPTR;
        ::QCryptographicHash *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QCryptographicHash, &sipCpp, sipType_QByteArrayView, &a0, &a0State, &a0UserState))
        {
            sipCpp->addData(*a0);
            sipReleaseTypeUS(a0, sipType_QByteArrayView, a0State, a0UserState);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    {
        const char* a0;
        Py_ssize_t a1;
        ::QCryptographicHash *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bk", &sipSelf, sipType_QCryptographicHash, &sipCpp, &a0, &a1))
        {
            sipCpp->addData(a0, (long long)a1);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    {
        ::QIODevice* a0;
        ::QCryptographicHash *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8", &sipSelf, sipType_QCryptographicHash, &sipCpp, sipType_QIODevice, &a0))
        {
            bool sipRes;

            sipRes = sipCpp->addData(a0);

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QCryptographicHash, sipName_addData, doc_QCryptographicHash_addData);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QCryptographicHash_result, "result(self) -> QByteArray");

extern "C" {static PyObject *meth_QCryptographicHash_result(PyObject *, PyObject *);}
static PyObject *meth_QCryptographicHash_result(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QCryptographicHash *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QCryptographicHash, &sipCpp))
        {
            ::QByteArray*sipRes;

            sipRes = new ::QByteArray(sipCpp->result());

            return sipConvertFromNewType(sipRes, sipType_QByteArray, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QCryptographicHash, sipName_result, doc_QCryptographicHash_result);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QCryptographicHash_resultView, "resultView(self) -> QByteArray");

extern "C" {static PyObject *meth_QCryptographicHash_resultView(PyObject *, PyObject *);}
static PyObject *meth_QCryptographicHash_resultView(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QCryptographicHash *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QCryptographicHash, &sipCpp))
        {
            ::QByteArrayView*sipRes;

            sipRes = new ::QByteArrayView(sipCpp->resultView());

            return sipConvertFromNewType(sipRes, sipType_QByteArrayView, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QCryptographicHash, sipName_resultView, doc_QCryptographicHash_resultView);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QCryptographicHash_hash, "hash(data: QByteArray|bytes|bytearray|memoryview, method: QCryptographicHash.Algorithm) -> QByteArray");

extern "C" {static PyObject *meth_QCryptographicHash_hash(PyObject *, PyObject *);}
static PyObject *meth_QCryptographicHash_hash(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::QByteArrayView* a0;
        int a0State = 0;
        void *a0UserState = SIP_NULLPTR;
        ::QCryptographicHash::Algorithm a1;

        if (sipParseArgs(&sipParseErr, sipArgs, "CJ1E", &sipSelf, sipType_QByteArrayView, &a0, &a0State, &a0UserState, sipType_QCryptographicHash_Algorithm, &a1))
        {
            ::QByteArray*sipRes;

            sipRes = new ::QByteArray(::QCryptographicHash::hash(*a0, a1));
            sipReleaseTypeUS(a0, sipType_QByteArrayView, a0State, a0UserState);

            return sipConvertFromNewType(sipRes, sipType_QByteArray, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QCryptographicHash, sipName_hash, doc_QCryptographicHash_hash);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QCryptographicHash_hashLength, "hashLength(method: QCryptographicHash.Algorithm) -> int");

extern "C" {static PyObject *meth_QCryptographicHash_hashLength(PyObject *, PyObject *);}
static PyObject *meth_QCryptographicHash_hashLength(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::QCryptographicHash::Algorithm a0;

        if (sipParseArgs(&sipParseErr, sipArgs, "CE", &sipSelf, sipType_QCryptographicHash_Algorithm, &a0))
        {
            int sipRes;

            sipRes = ::QCryptographicHash::hashLength(a0);

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QCryptographicHash, sipName_hashLength, doc_QCryptographicHash_hashLength);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QCryptographicHash_swap, "swap(self, other: QCryptographicHash)");

extern "C" {static PyObject *meth_QCryptographicHash_swap(PyObject *, PyObject *);}
static PyObject *meth_QCryptographicHash_swap(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::QCryptographicHash* a0;
        ::QCryptographicHash *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_QCryptographicHash, &sipCpp, sipType_QCryptographicHash, &a0))
        {
            sipCpp->swap(*a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QCryptographicHash, sipName_swap, doc_QCryptographicHash_swap);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QCryptographicHash_algorithm, "algorithm(self) -> QCryptographicHash.Algorithm");

extern "C" {static PyObject *meth_QCryptographicHash_algorithm(PyObject *, PyObject *);}
static PyObject *meth_QCryptographicHash_algorithm(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QCryptographicHash *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QCryptographicHash, &sipCpp))
        {
            ::QCryptographicHash::Algorithm sipRes;

            sipRes = sipCpp->algorithm();

            return sipConvertFromEnum(static_cast<int>(sipRes), sipType_QCryptographicHash_Algorithm);
        }
    }

    sipNoMethod(sipParseErr, sipName_QCryptographicHash, sipName_algorithm, doc_QCryptographicHash_algorithm);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QCryptographicHash_supportsAlgorithm, "supportsAlgorithm(method: QCryptographicHash.Algorithm) -> bool");

extern "C" {static PyObject *meth_QCryptographicHash_supportsAlgorithm(PyObject *, PyObject *);}
static PyObject *meth_QCryptographicHash_supportsAlgorithm(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::QCryptographicHash::Algorithm a0;

        if (sipParseArgs(&sipParseErr, sipArgs, "CE", &sipSelf, sipType_QCryptographicHash_Algorithm, &a0))
        {
            bool sipRes;

            sipRes = ::QCryptographicHash::supportsAlgorithm(a0);

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QCryptographicHash, sipName_supportsAlgorithm, doc_QCryptographicHash_supportsAlgorithm);

    return SIP_NULLPTR;
}


/* Call the instance's destructor. */
extern "C" {static void release_QCryptographicHash(void *, int);}
static void release_QCryptographicHash(void *sipCppV, int)
{
    delete reinterpret_cast< ::QCryptographicHash *>(sipCppV);
}


extern "C" {static void dealloc_QCryptographicHash(sipSimpleWrapper *);}
static void dealloc_QCryptographicHash(sipSimpleWrapper *sipSelf)
{
    if (sipIsOwnedByPython(sipSelf))
    {
        release_QCryptographicHash(sipGetAddress(sipSelf), 0);
    }
}


extern "C" {static void *init_type_QCryptographicHash(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_type_QCryptographicHash(sipSimpleWrapper *, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
    ::QCryptographicHash *sipCpp = SIP_NULLPTR;

    {
        ::QCryptographicHash::Algorithm a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "E", sipType_QCryptographicHash_Algorithm, &a0))
        {
            sipCpp = new ::QCryptographicHash(a0);

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_QCryptographicHash[] = {
    {sipName_addData, meth_QCryptographicHash_addData, METH_VARARGS, doc_QCryptographicHash_addData},
    {sipName_algorithm, meth_QCryptographicHash_algorithm, METH_VARARGS, doc_QCryptographicHash_algorithm},
    {sipName_hash, meth_QCryptographicHash_hash, METH_VARARGS, doc_QCryptographicHash_hash},
    {sipName_hashLength, meth_QCryptographicHash_hashLength, METH_VARARGS, doc_QCryptographicHash_hashLength},
    {sipName_reset, meth_QCryptographicHash_reset, METH_VARARGS, doc_QCryptographicHash_reset},
    {sipName_result, meth_QCryptographicHash_result, METH_VARARGS, doc_QCryptographicHash_result},
    {sipName_resultView, meth_QCryptographicHash_resultView, METH_VARARGS, doc_QCryptographicHash_resultView},
    {sipName_supportsAlgorithm, meth_QCryptographicHash_supportsAlgorithm, METH_VARARGS, doc_QCryptographicHash_supportsAlgorithm},
    {sipName_swap, meth_QCryptographicHash_swap, METH_VARARGS, doc_QCryptographicHash_swap}
};


/* Define the enum members and ints to be added to this type. */
static sipIntInstanceDef intInstances_QCryptographicHash[] = {
    {sipName_Md4, static_cast<int>(::QCryptographicHash::Md4)},
    {sipName_Md5, static_cast<int>(::QCryptographicHash::Md5)},
    {sipName_Sha1, static_cast<int>(::QCryptographicHash::Sha1)},
    {sipName_Sha224, static_cast<int>(::QCryptographicHash::Sha224)},
    {sipName_Sha256, static_cast<int>(::QCryptographicHash::Sha256)},
    {sipName_Sha384, static_cast<int>(::QCryptographicHash::Sha384)},
    {sipName_Sha512, static_cast<int>(::QCryptographicHash::Sha512)},
    {sipName_Sha3_224, static_cast<int>(::QCryptographicHash::Sha3_224)},
    {sipName_Sha3_256, static_cast<int>(::QCryptographicHash::Sha3_256)},
    {sipName_Sha3_384, static_cast<int>(::QCryptographicHash::Sha3_384)},
    {sipName_Sha3_512, static_cast<int>(::QCryptographicHash::Sha3_512)},
    {sipName_Keccak_224, static_cast<int>(::QCryptographicHash::Keccak_224)},
    {sipName_Keccak_256, static_cast<int>(::QCryptographicHash::Keccak_256)},
    {sipName_Keccak_384, static_cast<int>(::QCryptographicHash::Keccak_384)},
    {sipName_Keccak_512, static_cast<int>(::QCryptographicHash::Keccak_512)},
    {sipName_Blake2b_160, static_cast<int>(::QCryptographicHash::Blake2b_160)},
    {sipName_Blake2b_256, static_cast<int>(::QCryptographicHash::Blake2b_256)},
    {sipName_Blake2b_384, static_cast<int>(::QCryptographicHash::Blake2b_384)},
    {sipName_Blake2b_512, static_cast<int>(::QCryptographicHash::Blake2b_512)},
    {sipName_Blake2s_128, static_cast<int>(::QCryptographicHash::Blake2s_128)},
    {sipName_Blake2s_160, static_cast<int>(::QCryptographicHash::Blake2s_160)},
    {sipName_Blake2s_224, static_cast<int>(::QCryptographicHash::Blake2s_224)},
    {sipName_Blake2s_256, static_cast<int>(::QCryptographicHash::Blake2s_256)},
    {0, 0}
};

PyDoc_STRVAR(doc_QCryptographicHash, "\1QCryptographicHash(method: QCryptographicHash.Algorithm)");


sipClassTypeDef sipTypeDef_QtCore_QCryptographicHash = {
    {
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QCryptographicHash,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_QCryptographicHash,
        {0, 0, 1},
        9, methods_QCryptographicHash,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, intInstances_QCryptographicHash, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QCryptographicHash,
    -1,
    sipNameNr_PyQt6_sip_simplewrapper,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_QCryptographicHash,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QCryptographicHash,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_QCryptographicHash,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    sizeof (::QCryptographicHash),
};
