-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
lua: expose hash function to lua scripts - v1 #12437
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #12437 +/- ##
==========================================
+ Coverage 80.63% 80.67% +0.04%
==========================================
Files 920 921 +1
Lines 258704 258919 +215
==========================================
+ Hits 208595 208893 +298
+ Misses 50109 50026 -83
Flags with carried forward coverage won't be shown. Click here to find out more. |
Information: QA ran without warnings. Pipeline 24283 |
I think it looks good. |
I suppose one thing that will come up quickly, is how to keep state between invocations? Not something this PR should fix, but something to think about? |
338b3a9
to
e93e1e0
Compare
Make all the hasher's have the same variants: - add hex digest for sha256 - add finalize to hex for sha1 - add hex digest for sha1
e93e1e0
to
f4330e9
Compare
Expose md5, sha1, and sha256 to Lua scripts with `require("suricata.hashing")`. Ticket: 7073
27488d9
to
8c0c382
Compare
8c0c382
to
a8b9e2d
Compare
Information: QA ran without warnings. Pipeline 24316 |
Updated here and ready for final review: #12449 |
Expose md5, sha1, and sha256 to Lua scripts with
require("suricata.hashing")
.Draft as a few things are missing:
But does the API look OK? I put them all into the "suricata.hashing" namespace.
But we could also do something like
require("suricata.hashing.md5")
to bemore fine grained.
Ticket: https://redmine.openinfosecfoundation.org/issues/7073
SV_BRANCH=OISF/suricata-verify#2247