Convert to/from strings and array of bytes