Struct noise_ring::Sha512

source ·
pub struct Sha512 { /* private fields */ }

Trait Implementations§

source§

impl Default for Sha512

source§

fn default() -> Sha512

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

impl Hash for Sha512

§

type Block = [u8; 128]

Type of a block.
§

type Output = [u8; 64]

Type of output.
source§

fn name() -> &'static str

Name of the hash function.
source§

fn input(&mut self, data: &[u8])

Update hash context with some input.
source§

fn result(&mut self) -> Self::Output

Get hash result.
source§

fn block_len() -> usize

Length of block.
source§

fn hash_len() -> usize

Length of hash output, in number of bytes.
source§

fn reset(&mut self)

Reset state of hash context.
source§

fn hash(data: &[u8]) -> Self::Output

Calculate hash of some data.
source§

fn hmac_many(key: &[u8], data: &[&[u8]]) -> Self::Output

Calculate HMAC-THIS-HASH, with some key and several messages.
source§

fn hmac(key: &[u8], data: &[u8]) -> Self::Output

Calculate HMAC-THIS-HASH, with some key and a message.
source§

fn hkdf( chaining_key: &[u8], input_key_material: &[u8] ) -> (Self::Output, Self::Output)

Calculate HKDF, as specified in the noise spec.
source§

fn hkdf3( chaining_key: &[u8], input_key_material: &[u8] ) -> (Self::Output, Self::Output, Self::Output)

Triple output HKDF.

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. 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 Twhere 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, U> TryFrom<U> for Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.