Function hacspec_lib::i2osp

source ·
pub fn i2osp(value: usize, len: usize) -> Vec<u8> 
Expand description

From [RFC8017]:

I2OSP converts a nonnegative integer to an octet string of a specified length.

   I2OSP (x, xLen)

   Input:

      x        nonnegative integer to be converted

      xLen     intended length of the resulting octet string

   Output:

         X corresponding octet string of length xLen