Calculate the SHA256 hash of the zip binary file
(&self)
| 140 | |
| 141 | /// Calculate the SHA256 hash of the zip binary file |
| 142 | pub fn sha256(&self) -> Result<String> { |
| 143 | let data = self.read()?; |
| 144 | let mut hasher = Sha256::new(); |
| 145 | hasher.update(data); |
| 146 | let sha256 = format!("{:X}", hasher.finalize()); |
| 147 | Ok(sha256) |
| 148 | } |
| 149 | |
| 150 | /// List the files inside the zip archive |
| 151 | pub fn list(&self) -> Result<Vec<String>> { |