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

hash: should document byte order of Hash.Sum #12350

Closed
dsnet opened this issue Aug 26, 2015 · 2 comments
Closed

hash: should document byte order of Hash.Sum #12350

dsnet opened this issue Aug 26, 2015 · 2 comments

Comments

@dsnet
Copy link
Member

dsnet commented Aug 26, 2015

Using go1.5

The hash/* libraries output a slice with the hash in big endian byte order when the Hash.Sum([]byte) method is called. This is fine, but it should be documented.

This does not apply to crypto hashes since those hashes are long enough (and don't fit in native integer types) that nobody mistakes the byte order.

@dsnet dsnet changed the title hash: should document byte order of Hash hash: should document byte order of Hash.Sum Aug 26, 2015
@ianlancetaylor ianlancetaylor added this to the Unplanned milestone Aug 27, 2015
@minux
Copy link
Member

minux commented Sep 3, 2015

I don't think we can change the docs for hash.Hash.Sum now
as there might be existing implementations.

Instead my CL added docs to each use of the interface to
all four hash/* packages.

@gopherbot
Copy link

CL https://golang.org/cl/14275 mentions this issue.

@minux minux closed this as completed in 91ddc07 Sep 10, 2015
@golang golang locked and limited conversation to collaborators Sep 22, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants