View Source NostrBasics.Crypto (NostrBasics v0.0.14)

Crypto algorithms needed to communicate on the nostr network

Link to this section Summary

Functions

Computes SHA256 on a binary and returns it as a binary

Link to this section Functions

@spec sha256(String.t()) :: <<_::256>>

Computes SHA256 on a binary and returns it as a binary

examples

Examples

iex> "6c7ab2f961a1bc3f13cdc08dc41c3f439adebd549a8ef1c089e81a5907376107"
...> |> NostrBasics.Crypto.sha256()
<<0xab6a8f1d9e2b0333dff8e370ed6fdfe20b2e8008e045efb3fb3298c22f7569da::256>>