View Source Secrex.Cipher behaviour (Secrex v0.4.0)

Link to this section Summary

Link to this section Types

@type ciphertext() :: iodata()
@type key() :: iodata()
@type plaintext() :: iodata()

Link to this section Callbacks

Link to this callback

decrypt(ciphertext, key)

View Source
@callback decrypt(ciphertext(), key()) :: {:ok, plaintext()} | {:error, reason :: atom()}
@callback encrypt(plaintext(), key()) :: {:ok, ciphertext()} | {:error, reason :: atom()}