danielberkompas / cloak

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

[#93] Add option to specify iv length for AES.GCM #95

Closed danielberkompas closed 4 years ago

danielberkompas commented 4 years ago

This allows you to set a 12-byte IV as mentioned in #93, like so:

config :my_app, MyApp.Vault,
  ciphers: [
    default: {
      Cloak.Ciphers.AES.GCM,
      tag: "AES.GCM.V1",
      key: Base.decode64!("your-key-here"),
      iv_length: 12
    }
  ]

In Cloak 2.0, one of the breaking changes will be to make iv_length default to 12 instead of the current 16.

coveralls commented 4 years ago

Coverage Status

Coverage increased (+0.04%) to 98.81% when pulling adf5574afdddb86c0431efc2aaec0977e148b942 on 93-iv-length into 501a5a77a390e09be51e5c57c86bc5d7743033a6 on master.