Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

:crypto.hmac/3 removed in OTP 24 #47

Closed
jasbrake opened this issue May 31, 2021 · 4 comments · Fixed by #48
Closed

:crypto.hmac/3 removed in OTP 24 #47

jasbrake opened this issue May 31, 2021 · 4 comments · Fixed by #48

Comments

@jasbrake
Copy link

I'm using Elixir 1.12.0 (compiled with Erlang/OTP 24) and get the following error:

(UndefinedFunctionError) function :crypto.hmac/3 is undefined or private

According to https://erlang.org/doc/apps/crypto/new_api.html hmac/3 and hmac/4 have been deprecated in 23.0 and removed in OTP 24.0. The replacement would be mac/3 or mac4.

If it's important to maintain backward compatibility below 22.1 I suspect something like Kernel.function_exported?(:crypto, :mac, 3) could be used to determine which function to use (although I have no idea if this is standard practice).

Happy to submit a pull request!

@dvcrn
Copy link
Owner

dvcrn commented May 31, 2021

Currently this plugin is set to Elixir 1.7 and tested through the CI against 1.9.4 with OTP 22.2.

It could likely be that the newer versions aren't fully compatible yet, so yes we'll need to upgrade and bump the version

@amacgregor
Copy link
Contributor

amacgregor commented Jun 13, 2021

Just submitted a PR for this issue #48

@Cinderella-Man
Copy link
Collaborator

Hi @jasbrake,

I'm sorry that this kind of got weird a little bit - please don't feel discouraged by it - I completely missed this issue(sadly not enough time to maintain this lib as well as my other commitments) and would love if you would be the person that would raise PR for this. @amacgregor just jumped on it spontaneously - we should just say "yes" to your initial "Happy to submit a pull request!" a couple of weeks ago.

Apologies

@jasbrake
Copy link
Author

@Cinderella-Man no worries at all. I was able to downgrade versions and work around it so it wasn't a high priority for me. Also I personally didn't feel comfortable upgrading build versions without a conversation first. My goal was just to see the issue fixed eventually - I'm glad @amacgregor made that happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants