View Source Nostr.Crypto (Nostr Lib v0.1.1)
Crypto related stuff
Summary
Functions
Decrypt message with ECDH from seckey and pubkey (automatically extracts IV from message)
Encrypt message with ECDH from seckey and pubkey and append randomly generated IV
Get pubkey (hex encoded) from seckey (hex encoded)
Sign binary data (hex encoded) with seckey (hex encoded)
Functions
Decrypt message with ECDH from seckey and pubkey (automatically extracts IV from message)
Encrypt message with ECDH from seckey and pubkey and append randomly generated IV
Get pubkey (hex encoded) from seckey (hex encoded)
Example:
iex> Nostr.Crypto.pubkey("1111111111111111111111111111111111111111111111111111111111111111")
"4f355bdcb7cc0af728ef3cceb9615d90684bb5b2ca5f859ab0f0b704075871aa"
Sign binary data (hex encoded) with seckey (hex encoded)