Add support for `sha512`, refactor to easily add hash functions in the future. Also, skip autogenerated files.