I suppose it depends where you think the parameter should go.

I had assumed that a TOTP implementation just composed over the public HOTP class, which means the hash algorithm would need to be a constructor argument to HOTP.