Struct risc0_zkvm::guest::sha::Impl
source · pub struct Impl {}
Expand description
A guest-side Sha256 implementation.
Trait Implementations§
source§impl Sha256 for Impl
impl Sha256 for Impl
§type DigestPtr = &'static mut Digest
type DigestPtr = &'static mut Digest
A pointer to the digest created as the result of a hashing operation. Read more
source§fn hash_bytes(bytes: &[u8]) -> Self::DigestPtr
fn hash_bytes(bytes: &[u8]) -> Self::DigestPtr
Generate a SHA-256 hash from a slice of bytes, padding to block size
and adding the SHA-256 hash trailer, as specified in FIPS 180-4.
source§fn hash_words(words: &[u32]) -> Self::DigestPtr
fn hash_words(words: &[u32]) -> Self::DigestPtr
Generate a SHA-256 hash from a slice of words, padding to block size
and adding the SHA-256 hash trailer, as specified in FIPS 180-4.
source§fn hash_raw_pod_slice<T: Pod>(pod: &[T]) -> Self::DigestPtr
fn hash_raw_pod_slice<T: Pod>(pod: &[T]) -> Self::DigestPtr
Generate a hash from a slice of anything that can be represented as
plain old data. Pads up to the SHA-256 block boundary, but does not
add the standard SHA-256 trailer and so is not a standards compliant
hash.
source§fn compress(
state: &Digest,
block_half1: &Digest,
block_half2: &Digest
) -> Self::DigestPtr
fn compress( state: &Digest, block_half1: &Digest, block_half2: &Digest ) -> Self::DigestPtr
Execute the SHA-256 compression function on a single block given as
two half-blocks and return a pointer to the result. Read more
source§fn compress_slice(state: &Digest, blocks: &[Block]) -> Self::DigestPtr
fn compress_slice(state: &Digest, blocks: &[Block]) -> Self::DigestPtr
Execute the SHA-256 compression function on a slice of blocks following
the Merkle–Damgård construction and return a pointer to the result. Read more
Auto Trait Implementations§
impl Freeze for Impl
impl RefUnwindSafe for Impl
impl Send for Impl
impl Sync for Impl
impl Unpin for Impl
impl UnwindSafe for Impl
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