-
Notifications
You must be signed in to change notification settings - Fork 54
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
LD Key utilities #220
LD Key utilities #220
Conversation
@@ -32,6 +32,10 @@ const ( | |||
PS256 SignatureAlgorithm = "PS256" | |||
) | |||
|
|||
func (kt KeyType) String() string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm more used to .ToString() (java brain here) but if this is the better Go convention we can stick with this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default: | ||
return nil, fmt.Errorf("unsupported key type: %s", kt) | ||
} | ||
return crypto.BytesToPubKey(keyBytes, convertedKeyType) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type {
keyBytes []byte
keyType kt.String() type
}
would a wrapper object give much value? I guess you already have the keytype in hand so maybe not
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm...yeah we have LDKeyType
and this is going to KeyType
, but the interface that this method is most often being used with is expecting a gocrypto.PublicKey
No description provided.