pub fn encode_dat_v2( plaintext: &[u8], key: &ImageDatKey, layout: Option<DatLayout>, ) -> Result<Vec<u8>>