You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 24, 2021. It is now read-only.
Hi there! I'm working on a large project, where multihashing gets depended on. I'm not sure if this is a bug isolated in this package, or if it's introduced from some outer-dep (I don't expect this to be true but in this case, its ipld-dag-cbor@0.17.0).
The Multihashing.digest func, in the code comments, is supposed to return a Uint8Array. yet when I log digest instanceof Uint8Array, it returns false. This causes the following multihash.encode call to throw the error: digest should be a Uint8Array
The alg param in this instance is 0x18 or shake-128
For more clarity:
asyncfunctionMultihashing(buf,alg,length){console.log('buff instance of Uint8Array? ',bufinstanceofUint8Array)// => logs trueconstdigest=awaitMultihashing.digest(buf,alg,length)console.log('digest instance of Uint8Array?',digestinstanceofUint8Array)// => logs falsereturnmultihash.encode(digest,alg,length)}
This is obviously not going to play nicely with this line
The text was updated successfully, but these errors were encountered:
Hi there! I'm working on a large project, where multihashing gets depended on. I'm not sure if this is a bug isolated in this package, or if it's introduced from some outer-dep (I don't expect this to be true but in this case, its
ipld-dag-cbor@0.17.0
).The
Multihashing.digest
func, in the code comments, is supposed to return a Uint8Array. yet when I logdigest instanceof Uint8Array
, it returns false. This causes the followingmultihash.encode
call to throw the error:digest should be a Uint8Array
The
alg
param in this instance is0x18
orshake-128
For more clarity:
This is obviously not going to play nicely with this line
The text was updated successfully, but these errors were encountered: