generalpiston / typeorm-encrypted

Encrypted field for typeorm.
MIT License
74 stars 19 forks source link

The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined #66

Closed joskadarko closed 5 months ago

joskadarko commented 5 months ago

Getting this error when trying to update data inside table.

@Column({
    type: 'varchar',
    nullable: true,
    select: false,
    transformer: new EncryptionTransformer({
       key: process.env.ENCRYPTION_KEY,
       algorithm: 'aes-256-gcm',
       ivLength: 16,
    }),
  })
  secret: string;
repository.save(data)

When I comment out transformer inside column definition it passes without error.

edgardoflexio commented 3 months ago

I'm having the same issue. Have you resolved it @joskadarko ?