In early 2015 Homebrew started the process of deprecating SHA1 for package integrity verification. Since then formulae under the Homebrew organisation have been migrated to use SHA-256 for verification; this includes both source packages and our precompiled packages (bottles).
Homebrew has since stopped supporting SHA1 and MD5 entirely. MD5 checksums were removed from core formulae in 2012 and as of April 2015 installing a formula verified by MD5 is actively blocked.
We removed SHA1 support in November 2016, 21 months after we started warning people to move away from it for verification. This is enforced in the same way MD5 is, by blocking the installation of that individual formula until the checksum is migrated.
This means custom taps, local custom formulae, etc. need to be migrated to use SHA-256 before you can install them.