Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

hash256

Computes Bitcoin Hash256 (SHA256(SHA256(data))) from input data.

Implements the Bitcoin double SHA256 function used for transaction IDs, block hashes, and Base58Check checksums. Applies SHA256 twice for additional security.

Arguments

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

Returns

  • Array<u8> - 32-byte Hash256 result

Fully qualified path: alexandria_btc::hash::hash256

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