u64_pack(3)
limb manual
u64_pack(3)
NAME
u64_pack, u64_unpack, u64_pack_big, u64_unpack_big - store/read an u64 into/from a byte array
SYNOPSIS
#include <limb/u64.h>
void u64_pack(void *dst, u64 val) void u64_unpack(u64 *val, const void *sce) void u64_pack_big(void *dst, u64 val) void u64_unpack_big(u64 *val, const void *sce)
DESCRIPTION
All of these aim to either store the given number val
into the specified
byte array dst
, or read a number from the specified byte array sce
and set
the value pointed by val
to its value.
The u64_pack
() function stores the number val
into the 8 bytes pointed by
dst
, encoded as little endian.
The u64_unpack
() function reads 8 bytes pointed by sce
as little endian
encoded number, setting the value pointed by val
to its value.
The u64_pack_big
() function is similar to u64_pack
() only as big endian.
The u64_unpack_big
() function is similar to u64_unpack
() only as big endian.