mirror of
https://git.zx2c4.com/wireguard-go
synced 2025-09-18 20:57:50 +02:00
wgcfg: improve SymmetricKey docs
Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
This commit is contained in:
parent
024d6ea4c2
commit
d127a1647e
@ -229,8 +229,7 @@ func ParseSymmetricHexKey(s string) (SymmetricKey, error) {
|
|||||||
return key, nil
|
return key, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// SymmetricKey is a chacha20poly1305 key.
|
// SymmetricKey is a 32-byte value used as a pre-shared key.
|
||||||
// It is used by WireGuard to represent pre-shared symmetric keys.
|
|
||||||
type SymmetricKey [chacha20poly1305.KeySize]byte
|
type SymmetricKey [chacha20poly1305.KeySize]byte
|
||||||
|
|
||||||
func (k SymmetricKey) Base64() string { return base64.StdEncoding.EncodeToString(k[:]) }
|
func (k SymmetricKey) Base64() string { return base64.StdEncoding.EncodeToString(k[:]) }
|
||||||
|
Loading…
Reference in New Issue
Block a user