# Cloak with changeset issue - (UndefinedFunctionError) function Cloak.EncryptedBinaryField.equal?/2 is undefined or private

**URL:** <https://forum.elixirforum.com/t/cloak-with-changeset-issue-undefinedfunctionerror-function-cloak-encryptedbinaryfield-equal-2-is-undefined-or-private/46795>\
**Category:** Questions\
**Tags:** ecto, changesets, cloak\
**Created:** [March 24, 2022, 10:33pm UTC](https://forum.elixirforum.com/t/cloak-with-changeset-issue-undefinedfunctionerror-function-cloak-encryptedbinaryfield-equal-2-is-undefined-or-private/46795 "2022-03-24T22:33:52Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![santoshbt](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/santoshbt/32/29908_2.png) [@santoshbt](https://forum.elixirforum.com/u/santoshbt)\
**Post date:** [March 25, 2022, 2:45pm UTC](https://forum.elixirforum.com/t/cloak-with-changeset-issue-undefinedfunctionerror-function-cloak-encryptedbinaryfield-equal-2-is-undefined-or-private/46795/7 "2022-03-25T14:45:23Z")

</div>

Previously it was Cloak 0.6.2. I upgraded to cloak\_ecto 1.0  
previously  
config :cloak, Cloak.AES.CTR,

tag: “AES”,

default: true,

keys: [

```
%{tag: <<1>>, key: :base64.decode(<cloak_key_1>), default: true}

```

]

After update

# config :m

```elixir
y_future_now, MyFutureNow.Vault,

   ciphers: [

     default: {

       Cloak.AES.CTR,

       tag: "AES",

      key: Base.decode64!(cloak_key_1),

       # In AES.GCM, it is important to specify 12-byte IV length for

       # interoperability with other encryption software. See this GitHub

       # issue for more details:

       # https://github.com/danielberkompas/cloak/issues/93

       #

       # In Cloak 2.0, this will be the default iv length for AES.GCM.

        iv_length: 12

# }

# ]

```

I will try with key: :base64.decode(cloak\_key\_1) for now in upgraded

---

_[View the full topic](https://forum.elixirforum.com/t/cloak-with-changeset-issue-undefinedfunctionerror-function-cloak-encryptedbinaryfield-equal-2-is-undefined-or-private/46795)._
