Unable to encrypt data
SimonLab opened this issue · comments
Error while trying to use Fields.Encrypted
with a google token:
ya29.Il-yB-eegeLyTvygvFAtX-gJhq-LIfv1UskKVsczYPKtOeNB3l0P2ipcYNs0IrI2S5P1jZXPzfRSIYFhdsSx6ws5FYlNySzxeixEDbnTTtcrBg2a9fQJHzvWM6i9DWp2HA
(Postgrex.Error) ERROR 22021 (character_not_in_repertoire)
invalid byte sequence for encoding "UTF8": 0xb0
@SimonLab thanks for reporting this bug. 👍
Let's create a regression test for it and ensure we understand why the error occurs and how to prevent it.
@SimonLab perhaps we could add Phoenix as a dev dependency
so that we can test the insertion of the ciphertext
into Postgres?
Turns out that the data type for the field/column was defined as varchar
and needed to be bytea
data is saved to Postgres now. 👍