crypto: remove default encoding from DiffieHellman
getDefaultEncoding()
always returns 'buffer'
in Node.js 20.
In diffiehellman.js
, this value is always used as input to either toBuf()
, encode()
, or getArrayBufferOrView()
. All of these functions treat any falsy encoding just like 'buffer'
, so we can safely remove the calls to getDefaultEncoding()
.
This partially addresses: