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

Issue 3871 configure bin hashes #3951

Merged
merged 12 commits into from
Nov 5, 2023

Conversation

s1gse9v
Copy link
Contributor

@s1gse9v s1gse9v commented Nov 3, 2023

Your checklist for this pull request

  • I've read the guidelines for contributing to this repository
  • I made sure to follow the project's coding style
  • I've documented or updated the documentation of every function and struct this PR changes. If not so I've explained why.
  • I've added tests that prove my fix is effective or that my feature works (if possible)
  • I've updated the rizin book with the relevant information (if needed)

Detailed description

I have implemented the functionality requested in #3871. iT now computes and shows the algorithms specified in bin.hashes.default.

...

Test plan

I have tested using test/db/cmd/cmd_i. I'm having trouble running the remaining tests however (even on dev) so more testing is probably required.

...

Closing issues

closes #3871

...

librz/bin/bfile.c Outdated Show resolved Hide resolved
Copy link
Member

@wargio wargio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice! some changes are needed

librz/core/cconfig.c Outdated Show resolved Hide resolved
librz/core/cconfig.c Outdated Show resolved Hide resolved
* Because the hashes computed for a given bin are now set by
  cb_binhashes in bin->default_hashes, they have to be set manually in
  test_bin.c
test/integration/test_bin.c Outdated Show resolved Hide resolved
Copy link
Member

@wargio wargio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add also a test under db/cmd where you modify bin.hashes.default and print the hashes.

librz/bin/bfile.c Outdated Show resolved Hide resolved
librz/bin/bfile.c Outdated Show resolved Hide resolved
librz/bin/bfile.c Outdated Show resolved Hide resolved
librz/core/cconfig.c Outdated Show resolved Hide resolved
test/integration/test_bin.c Outdated Show resolved Hide resolved
Copy link
Member

@wargio wargio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just run ./sys/clang-format.py (requires to install first clang-format 16 https://github.com/rizinorg/rizin/blob/dev/DEVELOPERS.md#code-style)

Copy link
Member

@wargio wargio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. awesome job

@XVilka XVilka merged commit a667489 into rizinorg:dev Nov 5, 2023
43 of 44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show crc64, blake3 and sm3 hashes too in iT output
3 participants