Hmac (hash-based message authentication code) is needed to support mnemonics (for PBKDF2) and HD wallets, such that ecash-lib can be used standalone without other packages to e.g. generate mnemonics and derive HD wallet paths.
For this, we need SHA512 support (HD wallets use it), and we add a simple Hmac class that allows successive updates.
In theory, we could use sha256 and sha512 themselves in the HMAC, however, this will be far too slow in PBKDF2.