diff --git a/repak/src/pak.rs b/repak/src/pak.rs index 7aff848..c482c84 100644 --- a/repak/src/pak.rs +++ b/repak/src/pak.rs @@ -24,6 +24,8 @@ pub struct Pak { mount_point: String, index_offset: Option, index: Index, + encrypted_index: bool, + encryption_guid: Option, compression: Vec, } @@ -34,6 +36,8 @@ impl Pak { mount_point, index_offset: None, index: Index::new(path_hash_seed), + encrypted_index: false, + encryption_guid: None, compression: vec![], } } @@ -108,6 +112,14 @@ impl PakReader { &self.pak.mount_point } + pub fn encrypted_index(&self) -> bool { + self.pak.encrypted_index + } + + pub fn encryption_guid(&self) -> Option { + self.pak.encryption_guid + } + pub fn get(&self, path: &str, reader: &mut R) -> Result, super::Error> { let mut data = Vec::new(); self.read_file(path, reader, &mut data)?; @@ -343,6 +355,8 @@ impl Pak { mount_point, index_offset: Some(footer.index_offset), index, + encrypted_index: footer.encrypted, + encryption_guid: footer.encryption_uuid, compression: footer.compression, }) } diff --git a/repak_cli/src/main.rs b/repak_cli/src/main.rs index 5def37e..ca1aa7a 100644 --- a/repak_cli/src/main.rs +++ b/repak_cli/src/main.rs @@ -164,6 +164,8 @@ fn info(aes_key: Option, action: ActionInfo) -> Result<(), repak::E println!("mount point: {}", pak.mount_point()); println!("version: {}", pak.version()); println!("version major: {}", pak.version().version_major()); + println!("encrypted index: {}", pak.encrypted_index()); + println!("encrytion guid: {:032X?}", pak.encryption_guid()); println!("{} file entries", pak.files().len()); Ok(()) }