ex_crypto
ex_crypto copied to clipboard
using anything but aes_256 as the key fails
I'm trying to do basic AES encryption on some text
{:ok, aes_128_key} = ExCrypto.generate_aes_key(:aes_128, :bytes)
{:ok, {_iv, cipher_text}} = ExCrypto.encrypt(aes_128_key, "hi")
and I'm getting this error
** (MatchError) no match of right hand side value: %ErlangError{original: :notsup}
(ex_crypto) lib/ex_crypto.ex:28: ExCrypto.normalize_error/3
If I use aes_256 everything works.
I've encountered the same problem recently. Have you had any luck in figuring out the cause, @zacksiri?
I think that's an error that bubbled up from the underlying crypto library. What sort of environment are you running in?
Yes, 👍 I also found some note about this in the Erlang crypto docs.
Ubuntu 14.04.5 LTS OpenSSL 1.1.1 Erlang/OTP 21 Elixir 1.7.3