i2osp converts a positive integer into a byte string.
The first byte is LSB (least significant byte); the last byte is the MSB (most significant byte)
:: a typeCtrl KGHC 9.14.1 · lts/ghc-9.14.x · 45dd537 · 2026-10-11
Modulecryptonite-0.30Haskell2010
Fast serialization primitives for integer (little endian)
i2osp converts a positive integer into a byte string.
The first byte is LSB (least significant byte); the last byte is the MSB (most significant byte)
os2ip converts a byte string into a positive integer.
Just like i2ospOf except that it doesn't expect a failure: i.e. an integer larger than the number of output bytes requested.
For example if you just took a modulo of the number that represent the size (example the RSA modulo n).