Add support for other hash algorithms

Default is sha1, so this shouldn't break anything.