Closed x-ji closed 3 years ago
Though it does seem to be the case that those functions are introduced in relatively recent versions of crypto
.
I've been testing OTP24RC2 and indeed, this library breaks, because the old API is now completely deprecated. Hey @ntrepid8 , will you be updating it to work with the new :crypto API anytime soon? The JIT in OTP24 is highly desirable.
Yeah, this library needs some TLC to get it updated. I'm planning to devote some time, but I also like pull-requests if any of y'all want to take a shot at it :)
I confirm it's broken on OTP 24.
warning: :crypto.hmac/3 is undefined or private. Did you mean one of:
* mac/3
* mac/4
* macN/4
* macN/5
lib/ex_crypto/hmac.ex:15: ExCrypto.HMAC.hmac/3
warning: :crypto.block_decrypt/4 is undefined or private. Did you mean one of:
* public_decrypt/4
* public_encrypt/4
lib/ex_crypto.ex:388: ExCrypto._decrypt/4
warning: :crypto.block_encrypt/4 is undefined or private. Did you mean one of:
* public_decrypt/4
* public_encrypt/4
lib/ex_crypto.ex:317: ExCrypto._encrypt/4
In http://erlang.org/doc/apps/crypto/new_api.html it is recommended that the "new API", with functions such as
crypto_one_time/4
, be used over the "old API", with functions such asblock_encrypt/4
. The old functions might be deprecated in the future.ex_crypto
uses the old API in its implementations of theencrypt
function, for example.