mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-29 04:55:31 +00:00
disco: correct noun for nacl box type in disco docs
Updates #cleanup Signed-off-by: James Tucker <james@tailscale.com>
This commit is contained in:
parent
c6a274611e
commit
706e30d49e
@ -11,7 +11,7 @@
|
|||||||
// senderDiscoPub [32]byte // nacl public key
|
// senderDiscoPub [32]byte // nacl public key
|
||||||
// nonce [24]byte
|
// nonce [24]byte
|
||||||
//
|
//
|
||||||
// The recipient then decrypts the bytes following (the nacl secretbox)
|
// The recipient then decrypts the bytes following (the nacl box)
|
||||||
// and then the inner payload structure is:
|
// and then the inner payload structure is:
|
||||||
//
|
//
|
||||||
// messageType byte (the MessageType constants below)
|
// messageType byte (the MessageType constants below)
|
||||||
@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
const keyLen = 32
|
const keyLen = 32
|
||||||
|
|
||||||
// NonceLen is the length of the nonces used by nacl secretboxes.
|
// NonceLen is the length of the nonces used by nacl box.
|
||||||
const NonceLen = 24
|
const NonceLen = 24
|
||||||
|
|
||||||
type MessageType byte
|
type MessageType byte
|
||||||
@ -70,7 +70,7 @@ func Source(p []byte) (src []byte, ok bool) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Parse parses the encrypted part of the message from inside the
|
// Parse parses the encrypted part of the message from inside the
|
||||||
// nacl secretbox.
|
// nacl box.
|
||||||
func Parse(p []byte) (Message, error) {
|
func Parse(p []byte) (Message, error) {
|
||||||
if len(p) < 2 {
|
if len(p) < 2 {
|
||||||
return nil, errShort
|
return nil, errShort
|
||||||
|
Loading…
Reference in New Issue
Block a user