Since algorithm isn't always required to be a SHA family hash, this should probably be named "sum" or "hash".