crypto: remove default encoding from Hash/Hmac
getDefaultEncoding()
always returns 'buffer'
in Node.js 20. It requires some careful justification but the default encoding can be eliminated from hash.js
entirely. The reasoning is almost identical with that in https://github.com/nodejs/node/pull/49145 so I won't repeat it here. The main thing to note here is that digest()
conveniently defaults to BUFFER
for falsy encodings.
This partially addresses: