pub fn sha512_first_half(message: &[u8]) -> [u8; 32]
Expand description
Returns the first 32 bytes of SHA-512 hash of message.
§Examples
§Basic usage
use xrpl::core::keypairs::utils::sha512_first_half;
use xrpl::core::keypairs::utils::SHA512_HASH_LENGTH;
let message: &[u8] = "test message".as_bytes();
let sha_result: [u8; SHA512_HASH_LENGTH] = [
149, 11, 42, 126, 255, 167, 143, 81, 166, 53, 21,
236, 69, 224, 62, 206, 190, 80, 239, 47, 28, 65,
230, 150, 41, 181, 7, 120, 241, 27, 192, 128,
];
assert_eq!(sha_result, sha512_first_half(message));