/* Encode a length len/4 vector of (uint32_t) into a length len vector of (unsigned char) in big-endian form. Assumes len is a multiple of 4.  */
static void be32enc_vect(void *dst_, const void *src_, size_t len)
/* Encode a length len/4 vector of (uint32_t) into a length len vector of (unsigned char) in big-endian form. Assumes len is a multiple of 4.  */
static void be32enc_vect(void *dst_, const void *src_, size_t len)
{
    uint32_t *dst = dst_;
    const uint32_t *src = src_;
    for (size_t i = 0; i < len / 4; i++) {
        dst[i] = __builtin_bswap32(src[i]);
    }
}