go-cryptkeeper icon indicating copy to clipboard operation
go-cryptkeeper copied to clipboard

Encrypted Column Query

Open dondragon2 opened this issue 4 years ago • 1 comments

Is it possible to query by an encrypted field? If yes, how would this be done?

dondragon2 avatar May 19 '21 16:05 dondragon2

I believe since the encrypted value would typically be larger than a checksummed value, you would also want to store a checksummed value and then query on that versus the encrypted value. In any case, either way, you would probably just have something like .Query("... where enc_value = ?", encValue) or .Query("where md5_value = ?", checksummedValue) if that makes sense?

blaskovicz avatar May 19 '21 17:05 blaskovicz