Skip to content
This repository has been archived by the owner on Sep 6, 2022. It is now read-only.

Commit

Permalink
Merge pull request #56 from JorikSchellekens/patch-1
Browse files Browse the repository at this point in the history
Fix documentation missmatch for crypto methods.
  • Loading branch information
Stebalien authored Dec 7, 2019
2 parents 2ab3ece + dd55087 commit 54a9d30
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crypto/key.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,12 +351,12 @@ func MarshalPrivateKey(k PrivKey) ([]byte, error) {
return proto.Marshal(pbmes)
}

// ConfigDecodeKey decodes from b64 (for config file), and unmarshals.
// ConfigDecodeKey decodes from b64 (for config file) to a byte array that can be unmarshalled.
func ConfigDecodeKey(b string) ([]byte, error) {
return base64.StdEncoding.DecodeString(b)
}

// ConfigEncodeKey encodes to b64 (for config file), and marshals.
// ConfigEncodeKey encodes a marshalled key to b64 (for config file).
func ConfigEncodeKey(b []byte) string {
return base64.StdEncoding.EncodeToString(b)
}
Expand Down

0 comments on commit 54a9d30

Please sign in to comment.