AltairCA / EntityFrameworkCore.PostgreSQL.ColumnEncryption

NPGSQL Extension that supports native PostgreSql's [Raw Encryption Functions (encrypt_iv,decrypt_iv with aes-cbc/pad:pkcs)]
15 stars 3 forks source link

why the key and iv did't convert to byte array? #11

Open liugt34 opened 2 weeks ago

liugt34 commented 2 weeks ago

thank u for this nice project! i have some questions,can u explain ,than u very much!

in this code https://github.com/AltairCA/EntityFrameworkCore.PostgreSQL.ColumnEncryption/blob/99acc97447938897f8a21505cff796d6cc1006e7/AltairCA.EntityFrameworkCore.PostgreSQL.ColumnEncryption/Functions/AltairCAFunctionImplementation.cs#L138

this is the pgcrypto function

encrypt_iv(data bytea, key bytea, iv bytea, type text) returns bytea

i find the data is bytea, the key and iv are also bytea, but in the code ,why only convert data to bytea, and the key ,iv is still string

image