Cryppo.decrypt_with_derived_key

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

decrypt_with_derived_key(encrypted_data_with_derived_key, passphrase)

View Source

Specs

decrypt_with_derived_key(Cryppo.EncryptedDataWithDerivedKey.t(), String.t()) ::
  {:ok, binary(), Cryppo.DerivedKey.t()}
  | :decryption_error
  | {:decryption_error, {any(), any()}}
  | {:incompatible_key,
     [submitted_key_strategy: atom(), encryption_strategy: atom()]}

Decrypt data with a derived key

Example

iex> encrypted = Cryppo.encrypt_with_derived_key("data to encrypt", "Aes256Gcm", "Pbkdf2Hmac", "passphrase")
iex> {:ok, decrypted, _key} = Cryppo.decrypt_with_derived_key(encrypted, "passphrase")
iex> decrypted
"data to encrypt"