Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

sha256

Computes a single SHA256 hash from input data.

Provides a wrapper around the core SHA256 implementation to convert between different data formats and produce byte array output.

Arguments

  • data - Input data to hash as a span of bytes

Returns

  • Array<u8> - 32-byte SHA256 hash result

Fully qualified path: alexandria_btc::hash::sha256

pub fn sha256(data: Span<u8>) -> Array<u8>