the right way to do this is to provide hashes on a web server that lists all the files and their hashes. the connection to the server must be behind SSL / TLS to ensure that the server is the correct server and not an imposter.
in short - save hashes out of band from files.
source
share