qmessageauthenticationcode.sip 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. // qmessageauthenticationcode.sip generated by MetaSIP
  2. //
  3. // This file is part of the QtCore Python extension module.
  4. //
  5. // Copyright (c) 2026 Riverbank Computing Limited <info@riverbankcomputing.com>
  6. //
  7. // This file is part of PyQt6.
  8. //
  9. // This file may be used under the terms of the GNU General Public License
  10. // version 3.0 as published by the Free Software Foundation and appearing in
  11. // the file LICENSE included in the packaging of this file. Please review the
  12. // following information to ensure the GNU General Public License version 3.0
  13. // requirements will be met: http://www.gnu.org/copyleft/gpl.html.
  14. //
  15. // If you do not wish to use this file under the terms of the GPL version 3.0
  16. // then you may purchase a commercial license. For more information contact
  17. // info@riverbankcomputing.com.
  18. //
  19. // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
  20. // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  21. class QMessageAuthenticationCode
  22. {
  23. %TypeHeaderCode
  24. #include <qmessageauthenticationcode.h>
  25. %End
  26. public:
  27. %If (Qt_6_6_0 -)
  28. QMessageAuthenticationCode(QCryptographicHash::Algorithm method, QByteArrayView key = {});
  29. %End
  30. %If (- Qt_6_6_0)
  31. QMessageAuthenticationCode(QCryptographicHash::Algorithm method, const QByteArray &key = QByteArray());
  32. %End
  33. ~QMessageAuthenticationCode();
  34. void reset();
  35. %If (Qt_6_6_0 -)
  36. void setKey(QByteArrayView key);
  37. %End
  38. %If (- Qt_6_6_0)
  39. void setKey(const QByteArray &key);
  40. %End
  41. %If (Qt_6_6_0 -)
  42. void addData(QByteArrayView data);
  43. %End
  44. %If (- Qt_6_6_0)
  45. void addData(SIP_PYBUFFER);
  46. %MethodCode
  47. sipBufferInfoDef bi;
  48. if (sipGetBufferInfo(a0, &bi) > 0)
  49. {
  50. sipCpp->addData(reinterpret_cast<char *>(bi.bi_buf), bi.bi_len);
  51. sipReleaseBufferInfo(&bi);
  52. }
  53. else
  54. {
  55. sipIsErr = 1;
  56. }
  57. %End
  58. %End
  59. bool addData(QIODevice *device);
  60. QByteArray result() const;
  61. %If (Qt_6_6_0 -)
  62. static QByteArray hash(QByteArrayView message, QByteArrayView key, QCryptographicHash::Algorithm method);
  63. %End
  64. %If (- Qt_6_6_0)
  65. static QByteArray hash(const QByteArray &message, const QByteArray &key, QCryptographicHash::Algorithm method);
  66. %End
  67. %If (Qt_6_6_0 -)
  68. void swap(QMessageAuthenticationCode &other /Constrained/);
  69. %End
  70. private:
  71. QMessageAuthenticationCode(const QMessageAuthenticationCode &);
  72. };