Skip to content

hashAlg not set #24

Description

@robinsonkwame

e.g., passing in hashAlg has no effect,

const Hash = await require('pure-ipfs-only-hash')
const data = Buffer.from('hello world\n')
hashAlg = 'sha2-256'
cidVersion = 0

await Hash.of(data, {cidVersion, hashAlg})
# 'QmT78zSuBmuS4z925WZfrqQ1qHaJ56DQaTfyMUF7F8ff5o'
# ... but
hashAlg = 'blake2b-8'

await Hash.of(data, {cidVersion, hashAlg})
# 'QmT78zSuBmuS4z925WZfrqQ1qHaJ56DQaTfyMUF7F8ff5o'

even though the options object of ipfs-unixfs-importer is supported. For example, setting cidVersion = 1 works as expected.

Should I be using js-multiformats instead?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions