Secrex v0.3.0 Secrex.Cipher behaviour View Source
Link to this section Summary
Link to this section Types
Link to this type
ciphertext()
View Source
ciphertext()
View Source
ciphertext() :: iodata()
ciphertext() :: iodata()
Link to this type
key()
View Source
key()
View Source
key() :: iodata()
key() :: iodata()
Link to this type
plaintext()
View Source
plaintext()
View Source
plaintext() :: iodata()
plaintext() :: iodata()
Link to this section Callbacks
Link to this callback
decrypt(ciphertext, key)
View Source
decrypt(ciphertext, key)
View Source
decrypt(ciphertext(), key()) :: {:ok, plaintext()} | {:error, reason :: atom()}
decrypt(ciphertext(), key()) :: {:ok, plaintext()} | {:error, reason :: atom()}
Link to this callback
encrypt(plaintext, key)
View Source
encrypt(plaintext, key)
View Source
encrypt(plaintext(), key()) :: {:ok, ciphertext()} | {:error, reason :: atom()}
encrypt(plaintext(), key()) :: {:ok, ciphertext()} | {:error, reason :: atom()}