Hash

Struct Hash 

Source
pub struct Hash { /* private fields */ }
Expand description

The hash fields represent different bitwise hash algorithms and their values.

Field names for common hashes (e.g. MD5, SHA1) are predefined. Add fields for other hashes by lowercasing the hash algorithm name and using underscore separators as appropriate (snake case, e.g. sha3_512).

Note that this fieldset is used for common hashes that may be computed over a range of generic bytes. Entity-specific hashes such as ja3 or imphash are placed in the fieldsets to which they relate (tls and pe, respectively).

Implementations§

Source§

impl Hash

Source

pub fn get_md5(&self) -> Option<&String>

MD5 hash.

Source

pub fn set_md5(&mut self, md5_arg: String)

MD5 hash.

Source

pub fn get_sha1(&self) -> Option<&String>

SHA1 hash.

Source

pub fn set_sha1(&mut self, sha1_arg: String)

SHA1 hash.

Source

pub fn get_sha256(&self) -> Option<&String>

SHA256 hash.

Source

pub fn set_sha256(&mut self, sha256_arg: String)

SHA256 hash.

Source

pub fn get_sha384(&self) -> Option<&String>

SHA384 hash.

Source

pub fn set_sha384(&mut self, sha384_arg: String)

SHA384 hash.

Source

pub fn get_sha512(&self) -> Option<&String>

SHA512 hash.

Source

pub fn set_sha512(&mut self, sha512_arg: String)

SHA512 hash.

Source

pub fn get_ssdeep(&self) -> Option<&String>

SSDEEP hash.

Source

pub fn set_ssdeep(&mut self, ssdeep_arg: String)

SSDEEP hash.

Source

pub fn get_tlsh(&self) -> Option<&String>

TLSH hash.

Source

pub fn set_tlsh(&mut self, tlsh_arg: String)

TLSH hash.

Trait Implementations§

Source§

impl Clone for Hash

Source§

fn clone(&self) -> Hash

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for Hash

Source§

fn default() -> Hash

Returns the “default value” for a type. Read more
Source§

impl Serialize for Hash

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl Freeze for Hash

§

impl RefUnwindSafe for Hash

§

impl Send for Hash

§

impl Sync for Hash

§

impl Unpin for Hash

§

impl UnwindSafe for Hash

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.