pub struct Blake2F;Implementations§
Trait Implementations§
Source§impl Precompile for Blake2F
impl Precompile for Blake2F
Source§fn run(
&self,
input: &[u8],
target_gas: Option<EthGas>,
_context: &Context,
_is_static: bool,
) -> Result<PrecompileOutput, ExitError>
fn run( &self, input: &[u8], target_gas: Option<EthGas>, _context: &Context, _is_static: bool, ) -> Result<PrecompileOutput, ExitError>
The compression function of the blake2 algorithm.
Takes as an argument the state vector h, message block vector m (the last block is padded
with zeros to full block size, if required), 2w-bit offset counter t, and final block
indicator flag f. Local vector v[0..15] is used in processing. F returns a new state vector.
The number of rounds, r, is 12 for BLAKE2b and 10 for BLAKE2s. Rounds are numbered from 0 to
r - 1.
See: https://eips.ethereum.org/EIPS/eip-152
See: https://etherscan.io/address/0000000000000000000000000000000000000009
Auto Trait Implementations§
impl Freeze for Blake2F
impl RefUnwindSafe for Blake2F
impl Send for Blake2F
impl Sync for Blake2F
impl Unpin for Blake2F
impl UnwindSafe for Blake2F
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more