Hello there !
I can not get my head around this simple action -_- ... And I would like your opinion and help on this issue.
I did not find any similar post, but I might be wrong.
The context:
I'm using the dryoc crate, and I'm trying to create specifics nonce (a static part, and a incremental part like so : saltpack_recipsbXXXXXXXX
, with XXXXXXXX
an 8-byte big-endian unsigned integer.
The nonce is basically a [u8, 24].
I tried this code snippet:
let nonce: [u8; 24] = [b"saltpack_recipsb", &index.to_be_bytes()].concat();
But as I understand from the compiler, each element need to be the same size.
expected an array with a fixed size of 16 elements, found one with 4 elements
I tried other flows but I just get lost in the rust conversion system each time.
Do you have an easy way to create this byte array ?
Thank's in advance !