-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[pkg/ottl] Added ottl functions for hashing strings #22968
[pkg/ottl] Added ottl functions for hashing strings #22968
Conversation
6d3e0ad
to
34d3246
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't look at the details of the functions yet but the general structure of this PR is correct. Please add entries for each function in the ottlfuncs README.
b996a55
to
117ee0b
Compare
117ee0b
to
40d180a
Compare
78c7b64
to
3cc5a64
Compare
047f4e5
to
faef564
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding these. Overall looks good to me, just one question.
faef564
to
ea10106
Compare
I know I'm swooping in late, but could we please mention in the documentation that the SHA1 and SHA256 functions are not recommended to be used except where compatibility requires it? They're slow, insecure by modern standards, and really shouldn't be used by new applications. |
maybe a note like below? Note: SHA1 is not a recommended hash function by the National Institute of Standards and Technology (NIST) due to the availability of more secure alternatives like SHA3. |
That's OK, but we don't include SHA3 as an available function. Maybe instead: Note: According to the National Institute of Standards and Technology (NIST), SHA1 is no longer a recommended hash function. It should be avoided except when required for compatibility. New uses should prefer FNV whenever possible. |
Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com>
ea10106
to
182aff9
Compare
…2968) * [pkg/ottl] Added ottl functions for hashing strings * [pkg/ottl] Return nil on errors * Documentation and test changes for the hash functions Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> --------- Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com>
Description:
Added 3 ottl functions for hashing strings
Link to tracking Issue: #22725
Testing:
Added the following unit tests
Documentation: