Had a need to encrypt an array of strings (a supported Ecto type) in the db. Example use case is a list of permissions in a record. This used to work in Cloak version 0.3 by using the EncryptedMapField because it was simply running the data through Json without actually casting into Ecto. Newer versions cloak do more type checking, so the Ecto type {:array, :string} fails now.
This PR creates two new encrypted field types corresponding to the Ecto types of {:array, :string} and {:array, :integer}. They are simple variations of the existing Map type. Docs and tests for both have been added/updated.
Had a need to encrypt an array of strings (a supported Ecto type) in the db. Example use case is a list of permissions in a record. This used to work in Cloak version 0.3 by using the EncryptedMapField because it was simply running the data through Json without actually casting into Ecto. Newer versions cloak do more type checking, so the Ecto type {:array, :string} fails now.
This PR creates two new encrypted field types corresponding to the Ecto types of {:array, :string} and {:array, :integer}. They are simple variations of the existing Map type. Docs and tests for both have been added/updated.