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

Add of_hex and of_bin functions #50

Merged
merged 1 commit into from Sep 1, 2021
Merged

Conversation

MisterDA
Copy link
Contributor

It's easy to serialize a ShaX.t value: just convert it to its
hexadecimal or binary representation. However, the library doesn't
provide any means of unserializing the value.

This commit introduces functions to unserialize ShaX.t values from a
binary or an hexadecimal representation of a digest.

I'd like to share the hex_to_int and of_hex functions between the
modules, would you be fine with adding an util.h file to the
library?

Copy link
Owner

@djs55 djs55 left a comment

Choose a reason for hiding this comment

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

Looks useful! Feel free to add a util.h.

It's easy to serialize a ShaX.t value: just convert it to its
hexadecimal or binary representation. However, the library doesn't
provide any means of unserializing the value.

This commit introduces functions to unserialize ShaX.t values from a
binary or an hexadecimal representation of a digest.
@MisterDA
Copy link
Contributor Author

Done! also switched to ounit2 and added myself to the list of authors.

@djs55 djs55 merged commit 8b77ab3 into djs55:master Sep 1, 2021
@MisterDA MisterDA deleted the unserialize-sha-t branch September 1, 2021 09:02
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

2 participants