Packer icon indicating copy to clipboard operation
Packer copied to clipboard

Download verification with AWS MD5 ETag header

Open grilme99 opened this issue 3 years ago • 2 comments

AWS S3 provides an ETag header that contains an MD5 hash of the downloaded file. While this isn't really the intended use of the ETag header, it's something we can use to verify the authenticity of a file (thanks, @jmkd3v).

See: https://docs.aws.amazon.com/AmazonS3/latest/API/API_Object.html

An ETag header isn't guaranteed to exist, but in the case of Roblox, one is always provided.

grilme99 avatar Dec 04 '22 04:12 grilme99

Unfortunately, I do not own an Apple computer, so I am unable to compile this as it depends on platform::macos::WindowBuilderExtMacOS and others. Here is how the MD5 part would be done: https://github.com/recanman/Packer/blob/main/crates/client_bootstrapper/src/downloader/platform_impl/util.rs

I am still learning Rust, but this should work.

recanman avatar Apr 22 '23 01:04 recanman

Thanks, this is helpful! I'm going to need Packer working for a university assignment soon, so I will get it in a working state before then.

grilme99 avatar Apr 23 '23 15:04 grilme99