Skip to content

Use ex_multihash instead of :crypto.hash(:sha512, input) #8

Description

@nelsonic

At present, the Erlang :crypto.hash(:sha512, input) is called directly when creating a cid:

cid/lib/cid.ex

Line 25 in 3e8eb82

hash = :crypto.hash(:sha512, input)

In light of the fact that https://github.com/ipld/cid achieves a pretty similar goal,
I propose that we use multihash instead of directly creating a :sha512 hash.
This will ensure forward compatibility and also mean that we can use the JS cid function on the client.

Todo

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requesthelp wantedExtra attention is needed

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions