qcryptographichash.sip 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. // qcryptographichash.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 QCryptographicHash
  22. {
  23. %TypeHeaderCode
  24. #include <qcryptographichash.h>
  25. %End
  26. public:
  27. enum Algorithm
  28. {
  29. Md4,
  30. Md5,
  31. Sha1,
  32. Sha224,
  33. Sha256,
  34. Sha384,
  35. Sha512,
  36. Sha3_224,
  37. Sha3_256,
  38. Sha3_384,
  39. Sha3_512,
  40. Keccak_224,
  41. Keccak_256,
  42. Keccak_384,
  43. Keccak_512,
  44. Blake2b_160,
  45. Blake2b_256,
  46. Blake2b_384,
  47. Blake2b_512,
  48. Blake2s_128,
  49. Blake2s_160,
  50. Blake2s_224,
  51. Blake2s_256,
  52. };
  53. explicit QCryptographicHash(QCryptographicHash::Algorithm method);
  54. ~QCryptographicHash();
  55. void reset();
  56. %If (Qt_6_3_0 -)
  57. void addData(QByteArrayView data);
  58. %End
  59. %If (- Qt_6_3_0)
  60. void addData(const QByteArray &data);
  61. %End
  62. void addData(const char *data /Array/, qsizetype length /ArraySize/);
  63. bool addData(QIODevice *device);
  64. QByteArray result() const;
  65. %If (Qt_6_3_0 -)
  66. QByteArrayView resultView() const;
  67. %End
  68. %If (Qt_6_3_0 -)
  69. static QByteArray hash(QByteArrayView data, QCryptographicHash::Algorithm method);
  70. %End
  71. %If (- Qt_6_3_0)
  72. static QByteArray hash(const QByteArray &data, QCryptographicHash::Algorithm method);
  73. %End
  74. static int hashLength(QCryptographicHash::Algorithm method);
  75. %If (Qt_6_5_0 -)
  76. void swap(QCryptographicHash &other /Constrained/);
  77. %End
  78. %If (Qt_6_5_0 -)
  79. QCryptographicHash::Algorithm algorithm() const;
  80. %End
  81. %If (Qt_6_5_0 -)
  82. static bool supportsAlgorithm(QCryptographicHash::Algorithm method);
  83. %End
  84. private:
  85. QCryptographicHash(const QCryptographicHash &);
  86. };