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

internal/age: add x25519KeySize constant to replace repeated integer literals #1

Closed
wants to merge 1 commit into from

Conversation

mdlayher
Copy link
Contributor

@mdlayher mdlayher commented Oct 7, 2019

Signed-off-by: Matt Layher mdlayher@gmail.com

A quick tidy up to replace some "magic numbers" that appear in various places in the X25519 code.

…literals

Signed-off-by: Matt Layher <mdlayher@gmail.com>
@moritzdietz
Copy link

Maybe I have this wrong, but didn't he specifically leave those values to the fixed 32?

@FiloSottile
Copy link
Owner

Yeah, I went back and forth a couple times on this but I really don't like [x25519KeySize]byte.

To solve the impasse, I am just switching us to a prototype of golang/go#32670.

@FiloSottile FiloSottile closed this Oct 9, 2019
@Depado
Copy link

Depado commented Oct 9, 2019

Maybe I have this wrong, but didn't he specifically leave those values to the fixed 32?

This is the very definition of a magic number. See this for reference

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

4 participants