Why not use `Digest.const_get type.upcase` here, along with excluding weak hashes. This will allow older clients to work if a stronger digest is chosen, so long as ruby supports it.