[−][src]Struct qt_core::QCryptographicHash
The QCryptographicHash class provides a way to generate cryptographic hashes.
C++ class: QCryptographicHash
.
The QCryptographicHash class provides a way to generate cryptographic hashes.
QCryptographicHash can be used to generate cryptographic hashes of binary or text data.
Refer to the documentation of the QCryptographicHash::Algorithm enum for a list of the supported algorithms.
Methods
impl QCryptographicHash
[src]
pub unsafe fn add_data_char_int(
&mut self,
data: impl CastInto<Ptr<c_char>>,
length: c_int
)
[src]
&mut self,
data: impl CastInto<Ptr<c_char>>,
length: c_int
)
Adds the first length chars of data to the cryptographic hash.
Calls C++ function: void QCryptographicHash::addData(const char* data, int length)
.
Adds the first length chars of data to the cryptographic hash.
pub unsafe fn add_data_q_byte_array(
&mut self,
data: impl CastInto<Ref<QByteArray>>
)
[src]
&mut self,
data: impl CastInto<Ref<QByteArray>>
)
This function overloads addData().
Calls C++ function: void QCryptographicHash::addData(const QByteArray& data)
.
This function overloads addData().
pub unsafe fn add_data_q_io_device(
&mut self,
device: impl CastInto<MutPtr<QIODevice>>
) -> bool
[src]
&mut self,
device: impl CastInto<MutPtr<QIODevice>>
) -> bool
Reads the data from the open QIODevice device until it ends and hashes it. Returns true
if reading was successful.
Calls C++ function: bool QCryptographicHash::addData(QIODevice* device)
.
Reads the data from the open QIODevice device until it ends and hashes it. Returns true
if reading was successful.
This function was introduced in Qt 5.0.
pub unsafe fn hash(
data: impl CastInto<Ref<QByteArray>>,
method: Algorithm
) -> CppBox<QByteArray>
[src]
data: impl CastInto<Ref<QByteArray>>,
method: Algorithm
) -> CppBox<QByteArray>
Returns the hash of data using method.
Calls C++ function: static QByteArray QCryptographicHash::hash(const QByteArray& data, QCryptographicHash::Algorithm method)
.
Returns the hash of data using method.
pub unsafe fn hash_length(method: Algorithm) -> c_int
[src]
Returns the size of the output of the selected hash method in bytes.
Calls C++ function: static int QCryptographicHash::hashLength(QCryptographicHash::Algorithm method)
.
Returns the size of the output of the selected hash method in bytes.
This function was introduced in Qt 5.12.
This item is available if any(cpp_lib_version="5.12.2", cpp_lib_version="5.13.0", cpp_lib_version="5.14.0")
.
pub unsafe fn new(method: Algorithm) -> CppBox<QCryptographicHash>
[src]
Constructs an object that can be used to create a cryptographic hash from data using method.
Calls C++ function: [constructor] void QCryptographicHash::QCryptographicHash(QCryptographicHash::Algorithm method)
.
Constructs an object that can be used to create a cryptographic hash from data using method.
pub unsafe fn reset(&mut self)
[src]
Resets the object.
Calls C++ function: void QCryptographicHash::reset()
.
Resets the object.
pub unsafe fn result(&self) -> CppBox<QByteArray>
[src]
Returns the final hash value.
Calls C++ function: QByteArray QCryptographicHash::result() const
.
Returns the final hash value.
See also QByteArray::toHex().
pub unsafe fn static_meta_object() -> Ref<QMetaObject>
[src]
Returns a reference to the staticMetaObject
field.
Trait Implementations
impl CppDeletable for QCryptographicHash
[src]
Auto Trait Implementations
impl RefUnwindSafe for QCryptographicHash
impl Send for QCryptographicHash
impl Sync for QCryptographicHash
impl Unpin for QCryptographicHash
impl UnwindSafe for QCryptographicHash
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> CastInto<U> for T where
U: CastFrom<T>,
[src]
U: CastFrom<T>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> StaticUpcast<T> for T
[src]
unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
[src]
unsafe fn static_upcast_mut(ptr: MutPtr<T>) -> MutPtr<T>
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,