[][src]Function permutation_iterator::u64_to_32slice

pub fn u64_to_32slice(input: u64) -> [u8; 32]

Convert an unsigned 64 bit number so a slice of 32 bytes in big-endian format (most significant bit first).

Examples

use crate::permutation_iterator::u64_to_32slice;
let output = u64_to_32slice(42);
assert_eq!(output, [0, 0, 0, 0, 0, 0, 0, 0x2A,
                    0, 0, 0, 0, 0, 0, 0, 0,
                    0, 0, 0, 0, 0, 0, 0, 0,
                    0, 0, 0, 0, 0, 0, 0, 0]);