Hmm, actually, using bitset instead of a vector and then just memcpying into a char array of length 16 (bytes) works

Thanks all!