Merge pull request #56 from JorikSchellekens/patch-1

Fix documentation missmatch for crypto methods.
This commit is contained in:
Steven Allen 2019-12-06 21:50:47 -05:00 committed by GitHub
commit 54a9d30499
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)
}