Cloak issue - (UndefinedFunctionError) function :crypto.stream_init/3 is undefined or private

The function that’s missing is from “the old API” of the crypto module, which was deprecated in OTP 23 and removed entirely in OTP 24. That version of cloak_ecto will not work on anything higher than OTP 23.

From the last couple posts in your previous thread on this issue, it sounded like migrating was going to be a lengthy, incremental process:

  • upgrade to cloak 0.7 and do the data migration
  • upgrade to 0.8 and 0.9 (minor config changes)
  • THEN upgrade to Ecto 3 + 1.0, because of the changes in the type conversion machinery
  • upgrade to 1.1 to get the fix for the functions removed in OTP 24
2 Likes