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

Hex output for bytes #28

Closed
awfm9 opened this issue Dec 14, 2017 · 4 comments
Closed

Hex output for bytes #28

awfm9 opened this issue Dec 14, 2017 · 4 comments

Comments

@awfm9
Copy link
Contributor

awfm9 commented Dec 14, 2017

Currently, the bytes are returned as ASCII / code points. That's not very useful; in most cases, it would be better to have a hex encoding such as provided by the hex package of the standard library.

@rs rs added the enhancement label Feb 7, 2018
@rasky
Copy link
Contributor

rasky commented Feb 13, 2018

@rs I need this as well, I might end up working on a PR if we agree on the API.

My proposal is to add Hex8, Hex16, Hex32 and Hex64 wherever UintNN is used. The new hex functions would take uints of the specified size, but format then in hexadecimal format.

@rs
Copy link
Owner

rs commented Feb 13, 2018

Would you also have a Hex taking []byte?

@rasky
Copy link
Contributor

rasky commented Feb 13, 2018

You mean as counterpart to Bytes? Yes, that's also possible.

@rs
Copy link
Owner

rs commented Apr 27, 2018

Fixed by #42

@rs rs closed this as completed Apr 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants