Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maybe more explanations needed? #153

Open
ndrean opened this issue Sep 23, 2023 · 2 comments
Open

Maybe more explanations needed? #153

ndrean opened this issue Sep 23, 2023 · 2 comments

Comments

@ndrean
Copy link

ndrean commented Sep 23, 2023

If I encrypt a field, it has a hash version in the db. It seems (?) that the encryption key is an env key (the rotation if I read correctly) so that when you query, you may need to hash the input, query against the hash column and then with this code decrypt the corresponding value at that row. Is this ti? Is this automated in some way? It is not clear for me.

  • If I query an (encrypted) field, I want to pass the field as it is in the query, so that the type is in charge of the process above (-> hash, query, decode).
  • If I insert a field (to be encrypted). I just want to pass the field, and the type automatically inserts the corresponding hash.

Is this the way it works?

@nelsonic
Copy link
Member

nelsonic commented Sep 23, 2023

Much better explanation coming very soon: https://github.com/dwyl/fields-demo

@ndrean
Copy link
Author

ndrean commented Sep 24, 2023

So I used Cloak, exactly the way I described, easy. It works "at rest" but does not bring in some refinements you seem to have though. Thats why I came back to you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants