JuliaPackaging / BinaryBuilderBase.jl

https://juliapackaging.github.io/BinaryBuilderBase.jl/stable
MIT License
11 stars 31 forks source link

FileSource: support multiple hashes #244

Open maleadt opened 2 years ago

maleadt commented 2 years ago

Currently FileSource's hash is hard-coded to be SHA256, however, several projects publish different kinds of hashes (SHA1, commonly MD5, etc). For example, NVIDIA provides MD5sums for the CUDA installers: https://developer.download.nvidia.com/compute/cuda/11.7.0/docs/sidebar/md5sum.txt. It'd be nice if we could re-use these, as I currently have to download about 10GB of CUDA binaries before updating the package :-)

As a quick hack, I guess we could just look at the length of the hash to determine its type (64=SHA256, 40=SHA1, 32=MD5).