Struct core_crypto::Signature [−][src]
Expand description
512 bit hash type.
Implementations
impl Signature
[src]
impl Signature
[src]pub fn repeat_byte(byte: u8) -> Signature
[src]
pub fn repeat_byte(byte: u8) -> Signature
[src]Returns a new fixed hash where all bits are set to the given byte.
pub fn as_bytes_mut(&mut self) -> &mut [u8]
[src]
pub fn as_bytes_mut(&mut self) -> &mut [u8]
[src]Extracts a mutable byte slice containing the entire fixed hash.
pub fn as_fixed_bytes(&self) -> &[u8; 64]
[src]
pub fn as_fixed_bytes(&self) -> &[u8; 64]
[src]Extracts a reference to the byte array containing the entire fixed hash.
pub fn as_fixed_bytes_mut(&mut self) -> &mut [u8; 64]
[src]
pub fn as_fixed_bytes_mut(&mut self) -> &mut [u8; 64]
[src]Extracts a reference to the byte array containing the entire fixed hash.
pub fn to_fixed_bytes(self) -> [u8; 64]
[src]
pub fn to_fixed_bytes(self) -> [u8; 64]
[src]Returns the inner bytes array.
pub fn as_mut_ptr(&mut self) -> *mut u8
[src]
pub fn as_mut_ptr(&mut self) -> *mut u8
[src]Returns a mutable raw pointer to the value.
pub fn assign_from_slice(&mut self, src: &[u8])
[src]
pub fn assign_from_slice(&mut self, src: &[u8])
[src]pub fn from_slice(src: &[u8]) -> Self
[src]
pub fn from_slice(src: &[u8]) -> Self
[src]impl Signature
[src]
impl Signature
[src]Utilities using the byteorder
crate.
pub fn to_low_u64_be(&self) -> u64
[src]
pub fn to_low_u64_be(&self) -> u64
[src]Returns the lowest 8 bytes interpreted as big-endian.
Note
For hash type with less than 8 bytes the missing bytes are interpreted as being zero.
pub fn to_low_u64_le(&self) -> u64
[src]
pub fn to_low_u64_le(&self) -> u64
[src]Returns the lowest 8 bytes interpreted as little-endian.
Note
For hash type with less than 8 bytes the missing bytes are interpreted as being zero.
pub fn to_low_u64_ne(&self) -> u64
[src]
pub fn to_low_u64_ne(&self) -> u64
[src]Returns the lowest 8 bytes interpreted as native-endian.
Note
For hash type with less than 8 bytes the missing bytes are interpreted as being zero.
pub fn from_low_u64_be(val: u64) -> Self
[src]
pub fn from_low_u64_be(val: u64) -> Self
[src]Creates a new hash type from the given u64
value.
Note
- The given
u64
value is interpreted as big endian. - Ignores the most significant bits of the given value if the hash type has less than 8 bytes.
pub fn from_low_u64_le(val: u64) -> Self
[src]
pub fn from_low_u64_le(val: u64) -> Self
[src]Creates a new hash type from the given u64
value.
Note
- The given
u64
value is interpreted as little endian. - Ignores the most significant bits of the given value if the hash type has less than 8 bytes.
pub fn from_low_u64_ne(val: u64) -> Self
[src]
pub fn from_low_u64_ne(val: u64) -> Self
[src]Creates a new hash type from the given u64
value.
Note
- The given
u64
value is interpreted as native endian. - Ignores the most significant bits of the given value if the hash type has less than 8 bytes.
impl Signature
[src]
impl Signature
[src]Utilities using the rand
crate.
pub fn randomize_using<R: ?Sized>(&mut self, rng: &mut R) where
R: Rng,
[src]
pub fn randomize_using<R: ?Sized>(&mut self, rng: &mut R) where
R: Rng,
[src]Assign self
to a cryptographically random value using the
given random number generator.
pub fn random_using<R: ?Sized>(rng: &mut R) -> Self where
R: Rng,
[src]
pub fn random_using<R: ?Sized>(rng: &mut R) -> Self where
R: Rng,
[src]Create a new hash with cryptographically random content using the given random number generator.
Trait Implementations
impl<'r> BitAndAssign<&'r Signature> for Signature
[src]
impl<'r> BitAndAssign<&'r Signature> for Signature
[src]fn bitand_assign(&mut self, rhs: &'r Signature)
[src]
fn bitand_assign(&mut self, rhs: &'r Signature)
[src]Performs the &=
operation. Read more
impl BitAndAssign<Signature> for Signature
[src]
impl BitAndAssign<Signature> for Signature
[src]fn bitand_assign(&mut self, rhs: Signature)
[src]
fn bitand_assign(&mut self, rhs: Signature)
[src]Performs the &=
operation. Read more
impl<'r> BitOrAssign<&'r Signature> for Signature
[src]
impl<'r> BitOrAssign<&'r Signature> for Signature
[src]fn bitor_assign(&mut self, rhs: &'r Signature)
[src]
fn bitor_assign(&mut self, rhs: &'r Signature)
[src]Performs the |=
operation. Read more
impl BitOrAssign<Signature> for Signature
[src]
impl BitOrAssign<Signature> for Signature
[src]fn bitor_assign(&mut self, rhs: Signature)
[src]
fn bitor_assign(&mut self, rhs: Signature)
[src]Performs the |=
operation. Read more
impl<'r> BitXorAssign<&'r Signature> for Signature
[src]
impl<'r> BitXorAssign<&'r Signature> for Signature
[src]fn bitxor_assign(&mut self, rhs: &'r Signature)
[src]
fn bitxor_assign(&mut self, rhs: &'r Signature)
[src]Performs the ^=
operation. Read more
impl BitXorAssign<Signature> for Signature
[src]
impl BitXorAssign<Signature> for Signature
[src]fn bitxor_assign(&mut self, rhs: Signature)
[src]
fn bitxor_assign(&mut self, rhs: Signature)
[src]Performs the ^=
operation. Read more
impl FromStr for Signature
[src]
impl FromStr for Signature
[src]impl Ord for Signature
[src]
impl Ord for Signature
[src]impl PartialOrd<Signature> for Signature
[src]
impl PartialOrd<Signature> for Signature
[src]fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Copy for Signature
[src]
impl Eq for Signature
[src]
Auto Trait Implementations
impl RefUnwindSafe for Signature
impl Send for Signature
impl Sync for Signature
impl Unpin for Signature
impl UnwindSafe for Signature
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Rand for T where
Standard: Distribution<T>,
[src]
impl<T> Rand for T where
Standard: Distribution<T>,
[src]impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<T> ToHex for T where
T: AsRef<[u8]>,
[src]
impl<T> ToHex for T where
T: AsRef<[u8]>,
[src]pub fn encode_hex<U>(&self) -> U where
U: FromIterator<char>,
[src]
pub fn encode_hex<U>(&self) -> U where
U: FromIterator<char>,
[src]Encode the hex strict representing self
into the result. Lower case
letters are used (e.g. f9b4ca
) Read more
pub fn encode_hex_upper<U>(&self) -> U where
U: FromIterator<char>,
[src]
pub fn encode_hex_upper<U>(&self) -> U where
U: FromIterator<char>,
[src]Encode the hex strict representing self
into the result. Upper case
letters are used (e.g. F9B4CA
) Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,