Cryppo.decrypt

You're seeing just the function decrypt, go back to Cryppo module for more information.
Link to this function

decrypt(encrypted_data, encryption_key_or_raw_key)

View Source

Specs

decrypt(Cryppo.EncryptedData.t(), Cryppo.EncryptionKey.t() | any()) ::
  {:ok, binary()}
  | {:error, :invalid_encryption_key}
  | :decryption_error
  | {:decryption_error, {any(), any()}}
  | {:incompatible_key,
     [submitted_key_strategy: atom(), encryption_strategy: atom()]}

Decrypt encrypted data with an encryption key

Example

iex> {encrypted_data, encryption_key} = Cryppo.encrypt("data to encrypt", "Aes256Gcm")
iex> Cryppo.decrypt(encrypted_data, encryption_key)
{:ok, "data to encrypt"}