santoshbt
Hi All,
I have upgraded cloak version from 0.6.2 to {:cloak_ecto, “~> 1.0.0”}
Erlang/OTP 25 [erts-13.0.3] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:1] [jit:ns]
Elixir 1.13.4 (compiled with Erlang/OTP 25)
Whenever I try to migrate the old data or try to access them via application, I always get this error
** (UndefinedFunctionError) function :crypto.stream_init/3 is undefined or private
(crypto 5.1.1) :crypto.stream_init(:aes_ctr, {:ok, <<56, 138, 106, 17, 173, 175, 16, 175, 12, 85, 252, 249, 179, 209, 235, 182, 107, 31, 156, 93, 236, 143, 202, 221, 116, 65, 57, 95, 143, 79, 13, 188>>}, <<43, 125, 214, 253, 52, 165, 131, 44, 177, 202, 118, 147, 35, 5, 80, 209>>)
(cloak 1.0.3) lib/cloak/ciphers/deprecated/aes_ctr.ex:39: Cloak.Ciphers.Deprecated.AES.CTR.decrypt/2
(my_future_now 4.0.0) lib/cloak_ecto/type.ex:47: MyApp.Encrypted.Binary.load/1
(ecto 3.8.4) lib/ecto/type.ex:918: Ecto.Type.process_loaders/3
(ecto 3.8.4) lib/ecto/repo/queryable.ex:403: Ecto.Repo.Queryable.struct_load!/6
Function: &:erlang.apply/2
Args: [#Function<5.122125288/1 in Cloak.Ecto.Migrator.migrate_schema_with_data/2>, [1]]
[error] Task #PID<0.817.0> started from #PID<0.95.0> terminating
** (UndefinedFunctionError) function :crypto.stream_init/3 is undefined or private
(crypto 5.1.1) :crypto.stream_init(:aes_ctr, {:ok, <<56, 138, 106, 17, 173, 175, 16, 175, 12, 85, 252, 249, 179, 209, 235, 182, 107, 31, 156, 93, 236, 143, 202, 221, 116, 65, 57, 95, 143, 79, 13, 188>>}, <<225, 62, 249, 49, 101, 202, 45, 28, 221, 3, 238, 254, 112, 32, 115, 255>>)
(cloak 1.0.3) lib/cloak/ciphers/deprecated/aes_ctr.ex:39: Cloak.Ciphers.Deprecated.AES.CTR.decrypt/2
(my_future_now 4.0.0) lib/cloak_ecto/type.ex:47: MyApp.Encrypted.Binary.load/1
(ecto 3.8.4) lib/ecto/type.ex:918: Ecto.Type.process_loaders/3
Please help me, how rto resolve this issue.
Trending in Questions
Hello!
Suppose you are building workflow (order / task / payment) processing system with the following requirements:
Each workflow con...
New
I’m in search of an Elixir library that offers PDF generation capabilities similar to Ruby’s Prawn. While there have been discussions abo...
New
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
Using Phoenix.LiveView.TagEngine as an EEx.Engine is deprecated!
To compile HEEx, use Phoenix.LiveView.TagEngine.compile/2 instead.
Sta...
New
Before I dive in myself, did anyone successfully sprinkle Hologram into their existing LiveView app?
Looking for hints regarding:
Addi...
New
Hi all, I wanted to ask how the community is dealing with post-release steps.
Today we have Ecto migrations, which make sure that the db...
New
Kia ora,
We have been using elixir-google-api to connect to Google Drive. However, with the updates to Tesla due to CVEs this is now bro...
New
Other Trending Topics
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
I just stumbled on a newly redesigned elixir-lang.org. :tada: It looks like @Software_Mansion did the work, and I think it is generally a...
New
There has been a thread to discuss the Stack Overflow Developer Survey on this forum every year since 2018, so here’s yet another one for...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #blog-post
- #phoenix_html
- #iex
- #graphql
- #genstage
- #ai
- #elixirconf-us
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #hex
- #performance










First 6 of 6 Posts
benwilson512
Have you tried the most recent release of
cloak_ectowhich is “~> 1.2” ? I ask because OTP 25 is relatively recent, perhaps it is not supported by the version of cloak you are trying?al2o3cr
The function that’s missing is from “the old API” of the
cryptomodule, which was deprecated in OTP 23 and removed entirely in OTP 24. That version ofcloak_ectowill 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:
santoshbt
Thanks for the reply.
I tried upgrading the cloak to 0.7, but could not do the data migration. As it was already started giving the error on stream_init.
Hence I tried incrementing to later versions.
benwilson512
@santoshbt the
stream_initissue is because your moved to OTP 25 too fast. You’ll need to use OTP 23 until you finish the cloak upgrade, then you can switch to OTP 25.santoshbt
I am doing the same. For time being downgrading the OTP version.
santoshbt
Even after downgrading OTP version to 23, I am facing the error “Cloak.EncryptedBinaryField.equal?/2 is undefined or private” while inserting. But getting the data is working fine. It looks like it does not move anywhere now.
I suspect by default it upgrades ecto and ecto_sql as well.
I will install them in specific and check.