MCPcopy Index your code
hub / github.com/cargo-lambda/cargo-lambda / sha256

Method sha256

crates/cargo-lambda-build/src/archive.rs:142–148  ·  view source on GitHub ↗

Calculate the SHA256 hash of the zip binary file

(&self)

Source from the content-addressed store, hash-verified

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>> {

Callers

nothing calls this directly

Calls 2

newFunction · 0.85
readMethod · 0.80

Tested by

no test coverage detected