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

#181 add tera filter sha256_hash #185

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

krysopath
Copy link

This PR wants to add a new tera filter function for repeated sha256 hashes with an optional salt.

This intends not to be a solution for highly confidential secret, rather to provide a way of having a value in the output that can be verified when the salt is known.

For highly confidential values a more flexible hash should be used.

✓ Checklist:

  • This PR has been added to CHANGELOG.md (at the top of the list);
  • Tests for the changes have been added (for bug fixes / features);
  • Docs have been added / updated (for bug fixes / features).

@codecov-commenter
Copy link

codecov-commenter commented Jul 17, 2022

Codecov Report

Merging #185 (746d79c) into main (522cc42) will increase coverage by 0.20%.
The diff coverage is 97.36%.

@@            Coverage Diff             @@
##             main     #185      +/-   ##
==========================================
+ Coverage   86.58%   86.78%   +0.20%     
==========================================
  Files          57       57              
  Lines        4010     4086      +76     
==========================================
+ Hits         3472     3546      +74     
- Misses        538      540       +2     
Impacted Files Coverage Δ
...engine/src/transformers/template/hash_functions.rs 95.61% <97.36%> (+3.50%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 522cc42...746d79c. Read the comment docs.

@krysopath krysopath marked this pull request as draft July 17, 2022 14:14
@evgeniy-r
Copy link
Member

Hello!

Thank you for your contribution, is this PR ready (it is marked as draft)? If so, please update CHANGELOG.md and docs (near https://github.com/datanymizer/datanymizer/blob/main/docs/transformers.md#crypto) and I will merge the PR.

@krysopath
Copy link
Author

Hello @evgeniy-r ,

I was caught in internal discussion about disclosing our production db scheme to help debugging #178. Also there were suggestions of adding HMAC tera function for a "more secure" hashing. What do you think about adding HMAC in another PR?

I will update docs, changelog and undraft today.

@evgeniy-r
Copy link
Member

Yes, you can add HMAC too. It would be great.

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

Successfully merging this pull request may close these issues.

None yet

3 participants