All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.qt.core.QCryptographicHash Maven / Gradle / Ivy

There is a newer version: 6.8.1
Show newest version
package io.qt.core;


/**
 * 

Way to generate cryptographic hashes

*

Java wrapper for Qt class QCryptographicHash

*/ public class QCryptographicHash extends io.qt.QtObject { static { QtJambi_LibraryUtilities.initialize(); } /** * This variable stores the meta-object for the class. */ public static final io.qt.core.QMetaObject staticMetaObject = io.qt.core.QMetaObject.forType(QCryptographicHash.class); /** *

Java wrapper for Qt enum QCryptographicHash::Algorithm

*/ @io.qt.QtRejectedEntries({"RealSha3_224", "RealSha3_256", "RealSha3_384", "RealSha3_512"}) public enum Algorithm implements io.qt.QtEnumerator { Md4(0), Md5(1), Sha1(2), Sha224(3), Sha256(4), Sha384(5), Sha512(6), Keccak_224(7), Keccak_256(8), Keccak_384(9), Keccak_512(10), RealSha3_224(11), RealSha3_256(12), RealSha3_384(13), RealSha3_512(14), Sha3_224(11), Sha3_256(12), Sha3_384(13), Sha3_512(14), Blake2b_160(15), Blake2b_256(16), Blake2b_384(17), Blake2b_512(18), Blake2s_128(19), Blake2s_160(20), Blake2s_224(21), Blake2s_256(22); private Algorithm(int value) { this.value = value; } /** * {@inheritDoc} */ public int value() { return value; } /** * Returns the corresponding enum entry for the given value. * @param value * @return enum entry */ public static Algorithm resolve(int value) { switch (value) { case 0: return Md4; case 1: return Md5; case 2: return Sha1; case 3: return Sha224; case 4: return Sha256; case 5: return Sha384; case 6: return Sha512; case 7: return Keccak_224; case 8: return Keccak_256; case 9: return Keccak_384; case 10: return Keccak_512; case 11: return Sha3_224; case 12: return Sha3_256; case 13: return Sha3_384; case 14: return Sha3_512; case 15: return Blake2b_160; case 16: return Blake2b_256; case 17: return Blake2b_384; case 18: return Blake2b_512; case 19: return Blake2s_128; case 20: return Blake2s_160; case 21: return Blake2s_224; case 22: return Blake2s_256; default: throw new io.qt.QNoSuchEnumValueException(value); } } private final int value; } /** *

See QCryptographicHash::QCryptographicHash(QCryptographicHash::Algorithm)

*/ public QCryptographicHash(io.qt.core.QCryptographicHash.Algorithm method){ super((QPrivateConstructor)null); initialize_native(this, method); } private native static void initialize_native(QCryptographicHash instance, io.qt.core.QCryptographicHash.Algorithm method); /** *

See QCryptographicHash::addData(QIODevice*)

*/ @io.qt.QtUninvokable public final boolean addData(io.qt.core.QIODevice device){ return addData_native_QIODevice_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(device)); } @io.qt.QtUninvokable private native boolean addData_native_QIODevice_ptr(long __this__nativeId, long device); /** *

See QCryptographicHash::addData(QByteArray)

*/ @io.qt.QtUninvokable public final void addData(io.qt.core.QByteArray data){ addData_native_cref_QByteArray(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(data)); } @io.qt.QtUninvokable private native void addData_native_cref_QByteArray(long __this__nativeId, long data); @io.qt.QtUninvokable public final void addData(byte[] data){ java.util.Objects.requireNonNull(data, "Argument 'data': null not expected."); addData_native_const_char_ptr_qsizetype(QtJambi_LibraryUtilities.internal.nativeId(this), data); } @io.qt.QtUninvokable private native void addData_native_const_char_ptr_qsizetype(long __this__nativeId, byte[] data); /** *

See QCryptographicHash::reset()

*/ @io.qt.QtUninvokable public final void reset(){ reset_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native void reset_native(long __this__nativeId); /** *

See QCryptographicHash::result()const

*/ @io.qt.QtUninvokable public final io.qt.core.QByteArray result(){ return result_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native io.qt.core.QByteArray result_native_constfct(long __this__nativeId); /** *

See QCryptographicHash::hash(QByteArray,QCryptographicHash::Algorithm)

*/ public static io.qt.core.QByteArray hash(io.qt.core.QByteArray data, io.qt.core.QCryptographicHash.Algorithm method){ return hash_native_cref_QByteArray_QCryptographicHash_Algorithm(QtJambi_LibraryUtilities.internal.checkedNativeId(data), method.value()); } private native static io.qt.core.QByteArray hash_native_cref_QByteArray_QCryptographicHash_Algorithm(long data, int method); /** *

See QCryptographicHash::hashLength(QCryptographicHash::Algorithm)

*/ public static int hashLength(io.qt.core.QCryptographicHash.Algorithm method){ return hashLength_native_QCryptographicHash_Algorithm(method.value()); } private native static int hashLength_native_QCryptographicHash_Algorithm(int method); /** * Constructor for internal use only. * @param p expected to be null. */ @io.qt.NativeAccess protected QCryptographicHash(QPrivateConstructor p) { super(p); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy