ExNudge.Encryption (ExNudge v1.0.0)

View Source

Handles payload encryption according to RFC 8291 and RFC 8292.

Summary

Types

encrypted_payload()

@type encrypted_payload() :: %{
  ciphertext: binary(),
  salt: binary(),
  as_public_key: binary()
}

Functions

encrypt(message, map)

@spec encrypt(String.t(), map()) :: {:ok, encrypted_payload()} | {:error, atom()}

generate_keypair()

generate_salt()