-
Notifications
You must be signed in to change notification settings - Fork 173
Open
Description
Hi! Thanks for the great module! It's worked well for me, but I get the incorrect result for ArrayBuffer input, even if I wrap it in a Uint8Array. For example, and comparing to the js-md5 module:
> jsMd5 = require('js-md5')
> md5 = require('md5')
> buffer = new ArrayBuffer(9)
ArrayBuffer { byteLength: 9 }
> x = new Uint8Array(buffer)
Uint8Array [ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
> jsMd5(buffer)
'3f2829b2ffe8434d67f98a2a98968652'
> jsMd5(x)
'3f2829b2ffe8434d67f98a2a98968652'
> md5(buffer)
'441018525208457705bf09a8ee3c1093'
> md5(x)
'f3c8bdb6b9df478f227af2ce61c8a5a1'
Checking the hash of the bytes directly via https://cryptii.com/pipes/md5-hash confirms the js-md5 result :
See also: #42
nmeyvis, maknahar, GugaLiz, tbmore, josephfrazier and 1 more
Metadata
Metadata
Assignees
Labels
No labels
