Use the stdlib hash factory.

It's not quite everything I need, but it's clearer how you'd go about
adding, say, RIPEMD160.