Skip to content
This repository has been archived by the owner on Dec 7, 2019. It is now read-only.

feat: refactor key interface #34

Merged
merged 4 commits into from
Jul 25, 2018
Merged

feat: refactor key interface #34

merged 4 commits into from
Jul 25, 2018

Conversation

dignifiedquire
Copy link
Member

This now allows full access to the raw bytes of all keys and unifies pb marshals

  • add Raw
  • add Type
  • deprecate Bytes

cc @Stebalien

This now allows full access to the raw bytes of all keys and unifies pb marshals

cc @Stebalien
@dignifiedquire dignifiedquire requested a review from Stebalien July 13, 2018 15:57
@ghost ghost assigned dignifiedquire Jul 13, 2018
@ghost ghost added the in progress label Jul 13, 2018
Copy link
Member

@Stebalien Stebalien left a comment

Choose a reason for hiding this comment

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

Also needs a go fmt.

ed25519.go Outdated
pbmes.Type = &typ
pbmes.Data = (*k.k)[:]
return proto.Marshal(pbmes)
func (sk *Ed25519PublicKey) Type() pb.KeyType {
Copy link
Member

Choose a reason for hiding this comment

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

Should use k as the receiver.

key.go Outdated
Bytes() ([]byte, error)

// Equals checks whether two PubKeys are the same
Equals(Key) bool

// Raw returns the raw bytes of the key.
Raw() ([]byte, error)
Copy link
Member

Choose a reason for hiding this comment

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

Note that this is the inverse of the {Pub,Priv}KeyUnmarshaler.

@ghost ghost assigned Stebalien Jul 25, 2018
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants