Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

sha512

Computes SHA-512 hash of the input data

This function implements the SHA-512 cryptographic hash algorithm following RFC 6234. It processes the input by padding it appropriately, then processing in 1024-bit blocks through 80 rounds of operations using the SHA-512 compression function.

Arguments

  • data - Array of bytes to be hashed

Returns

  • Array<u8> - The 64-byte SHA-512 hash digest as an array of bytes

Fully qualified path: alexandria_math::sha512::sha512

pub fn sha512(mut data: Array<u8>) -> Array<u8>