danielberkompas / cloak

Elixir encryption library designed for Ecto
MIT License
582 stars 55 forks source link

Cloak relies in deprecated :crypto API that will be removed in OTP 24 #102

Closed v0idpwn closed 3 years ago

v0idpwn commented 3 years ago

We are getting close to OTP 24 and I think this issue should be addressed.

danielberkompas commented 3 years ago

I'd happily accept a PR for this if you're able.

v0idpwn commented 3 years ago

Sure, will do it :)

Shall we keep support for OTP 21? We can dinamically select which API should be used based on the running version.

danielberkompas commented 3 years ago

Yes please. That's the main reason this hasn't been done yet.

wingyplus commented 3 years ago

Do we need to have elixir and otp job matrix in semaphore ci to test against the old version and incoming version?

v0idpwn commented 3 years ago

I think this would be the best, according to the decision to maintain compatibility with 21, @wingyplus.

Personally, I'd break compatibility with OTP 21. Even rebar doesn't support it anymore, and users that plan to stick to it could just not update Cloak. This would also allow to use Persistent Term instead of ETS as vault (The current vault implementation isn't really a bottleneck, but it seems like the correct decision).

wingyplus commented 3 years ago

I have been try in https://github.com/wingyplus/cloak/blob/ci-matrix/.semaphore/semaphore.yml. I will open a PR if maintainer is ok to have it. :)

During setup, I found that Elixir 1.12 is require OTP version 22+ (refer to https://wingyplus.semaphoreci.com/jobs/5c15f396-a07b-41eb-958b-ba22e912ce31).

danielberkompas commented 3 years ago

This is fixed in #104!