Macfly.Crypto (macfly v0.2.21)

Copy Markdown View Source

Summary

Types

ciphertext()

@type ciphertext() :: <<_::224, _::_*8>>

key()

@type key() :: <<_::256>>

Functions

rand(n)

@spec rand(integer()) :: binary()

seal(plaintext, key)

@spec seal(binary(), key()) :: binary()

sign(msg, key)

@spec sign(binary(), binary()) :: binary()

unseal(ciphertext, key)

@spec unseal(ciphertext(), key()) :: {:ok, binary()} | {:error, any()}