support multi-byte wide typed arrays
Same as: https://github.com/browserify/hash-base/pull/19, https://github.com/browserify/cipher-base/pull/23, but retains support for Array and Array-like objects, since this module isn't closely mimicking the Node.js API
For array-likes, coherence rechecks are added to ensure invalid results are not returned
On everything Node.js createHash works, this now should be compatible + additionally keeps array-like support
Looks like node < 8 doesn't support passing a typed array directly into .update
@ljharb yes, but newer versions do + this impl works regardless when proper new Uint8Array and ArrayBuffer.isView are supported by the runtime, for compat with newer versions. It still matches old Node.js on everything with what old Node.js works.
ah ok cool. then we just need an easy way to feature-detect whether update takes a typed array, for the tests :-)