mirror of
https://github.com/libp2p/go-libp2p-core.git
synced 2025-03-12 10:50:11 +08:00
Merge pull request #56 from JorikSchellekens/patch-1
Fix documentation missmatch for crypto methods.
This commit is contained in:
commit
54a9d30499
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user