On 1/21/26 8:15 AM, Gary Guo wrote:
> On Wed Dec 3, 2025 at 5:59 AM GMT, John Hubbard wrote:
...
>> +        // SAFETY: hash384 is a [u32; 12] array (48 bytes), and we create a 
>> byte slice of
>> +        // exactly FSP_HASH_SIZE (48) bytes. The pointer is valid and 
>> properly aligned.
>> +        let hash_bytes = unsafe {
>> +            core::slice::from_raw_parts_mut(
>> +                signatures.hash384.as_mut_ptr().cast::<u8>(),
>> +                FSP_HASH_SIZE,
>> +            )
>> +        };
> 
> This can be `signature.hash384.as_bytes_mut()[..FSP_HASH_SIZE]` without using
> `unsafe`. Same below.
> 

Done. That's a lot less code, too, great!

thanks,
-- 
John Hubbard

Reply via email to