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 MarshalBinary/UnmarshalBinary support #68

Merged
merged 4 commits into from
Feb 22, 2023

Conversation

klauspost
Copy link
Contributor

@klauspost klauspost commented Feb 22, 2023

Fixes #67

Mainly copied from stdlib.

@harshavardhana harshavardhana merged commit 6096f89 into minio:master Feb 22, 2023
@klauspost klauspost deleted the add-marshal-unmarshal branch February 22, 2023 13:25
@SuperSandro2000
Copy link

Can you create a new release with this fix? On 11th gen Intel CPUs which have avx512 it causes a compilation error.

@klauspost
Copy link
Contributor Author

@SuperSandro2000 v1.0.1 released.

Comment on lines +414 to +419
if len(b) < len(magic256) || string(b[:len(magic256)]) != magic256 {
return errors.New("crypto/sha256: invalid hash state identifier")
}
if len(b) != marshaledSize {
return errors.New("crypto/sha256: invalid hash state size")
}

Choose a reason for hiding this comment

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

Perhaps these errors shouldn't be referencing crypto/sha256?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Feel free to send a PR.

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.

sha256-simd does not implement encoding.BinaryMarshaler/encoding.BinaryUnmarshaler
4 participants