hash: add a function to lookup hash algorithm by length