-
Notifications
You must be signed in to change notification settings - Fork 2.7k
[pkg/ottl] add LuhnValid
function
#38353
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] add LuhnValid
function
#38353
Conversation
Signed-off-by: Florian Bacher <[email protected]>
Signed-off-by: Florian Bacher <[email protected]>
Signed-off-by: Florian Bacher <[email protected]>
… feat/37880/luhn-function
Signed-off-by: Florian Bacher <[email protected]>
Signed-off-by: Florian Bacher <[email protected]>
Luhn
functionLuhnValid
function
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.
The OTTL bits look right, I can't validate if the algorithm is implemented correctly.
Signed-off-by: Florian Bacher <[email protected]>
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.
Ran a quick check of the algorithm, works with my credit card numbers. 👍
Co-authored-by: Evan Bradley <[email protected]>
Description
This PR adds the
Luhn
function which can be used to verify the checksum of e.g. credit card numbers, as discussed in the related issueLink to tracking issue
Fixes #37880
Testing
Added Unit and E2E tests
Documentation
Described the new function in the readme