[][src]Struct qt_core::QCryptographicHash

#[repr(C)]
pub struct QCryptographicHash { /* fields omitted */ }

The QCryptographicHash class provides a way to generate cryptographic hashes.

C++ class: QCryptographicHash.

C++ documentation:

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]

Adds the first length chars of data to the cryptographic hash.

Calls C++ function: void QCryptographicHash::addData(const char* data, int length).

C++ documentation:

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]

This function overloads addData().

Calls C++ function: void QCryptographicHash::addData(const QByteArray& data).

C++ documentation:

This function overloads addData().

pub unsafe fn add_data_q_io_device(
    &mut self,
    device: impl CastInto<MutPtr<QIODevice>>
) -> bool
[src]

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).

C++ documentation:

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]

Returns the hash of data using method.

Calls C++ function: static QByteArray QCryptographicHash::hash(const QByteArray& data, QCryptographicHash::Algorithm method).

C++ documentation:

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).

C++ documentation:

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).

C++ documentation:

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().

C++ documentation:

Resets the object.

pub unsafe fn result(&self) -> CppBox<QByteArray>[src]

Returns the final hash value.

Calls C++ function: QByteArray QCryptographicHash::result() const.

C++ documentation:

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]

unsafe fn delete(&mut self)[src]

Destroys the object.

Calls C++ function: [destructor] void QCryptographicHash::~QCryptographicHash().

C++ documentation:

Destroys the object.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.