indutny / hash.js

Hash functions in pure javascript
317 stars 42 forks source link

Fix return type for `MessageDigest#digest` method #19

Closed th0r closed 6 years ago

th0r commented 6 years ago

Fixes https://github.com/indutny/hash.js/issues/17

indutny commented 6 years ago

Does it depend on encoding? For hex it is obviously string, but otherwise is it an array instance?

th0r commented 6 years ago

Does it depend on encoding?

Hmm, I don't know. I thought you're the author of this lib 😉

indutny commented 6 years ago

It might be a good time to investigate it then :wink:

th0r commented 6 years ago

but otherwise is it an array instance

Checked the source code - yes, if enc is not set it returns number[].

indutny commented 6 years ago

Published in 1.1.5