Anoma.Crypto.Encrypt (Anoma v0.29.0)
Summary
Functions
I seal the given message for the publicly known recipient.
Types
Link to this type
box_public()
@type box_public() :: <<_::256>>
Link to this type
box_secret()
@type box_secret() :: <<_::256>>
Link to this type
public()
@type public() :: box_public()
Link to this type
secret()
@type secret() :: box_secret()
Functions
Link to this function
new_keypair()
@spec new_keypair() :: %{public: box_public(), secret: box_secret()}
Link to this function
seal(message, pub)
@spec seal(any(), box_public()) :: binary()
I seal the given message for the publicly known recipient.
The message will be turned into binary via :erlang.term_to_binary, so please do not turn it to binary before hand.
Link to this function
unseal(cipher, pub, sec)
@spec unseal(binary(), box_public(), box_secret()) :: {:ok, any()} | {:error, :failed_verification}