Updated ComputeHash method so that it automatically determined the hash size.