As I’m sure you’ve noticed in the latest Sponge Update:
- Downloaded content must have hard-coded SHA256 (or better) based hash checking
- Downloaded content must be performed over HTTPS connections
In order to help folks that might not know how to approach this or just for anyone that does not want to write a download routine on their own again, I’ve assembled a GIST that download from a URL with request headers to a local Path and validates the hash.
The GIST has full JavaDocs, hope it’s useful for some folks