go/src/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305.go

const KeySize

const NonceSize

const NonceSizeX

const Overhead

type chacha20poly1305

// New returns a ChaCha20-Poly1305 AEAD that uses the given 256-bit key.
func New(key []byte) (cipher.AEAD, error) {}

func (c *chacha20poly1305) NonceSize() int {}

func (c *chacha20poly1305) Overhead() int {}

func (c *chacha20poly1305) Seal(dst, nonce, plaintext, additionalData []byte) []byte {}

var errOpen

func (c *chacha20poly1305) Open(dst, nonce, ciphertext, additionalData []byte) ([]byte, error) {}

// sliceForAppend takes a slice and a requested number of bytes. It returns a
// slice with the contents of the given slice followed by that many bytes and a
// second slice that aliases into it and contains only the extra bytes. If the
// original slice has sufficient capacity then no allocation is performed.
func sliceForAppend(in []byte, n int) (head, tail []byte) {}