MCPcopy Create free account
hub / github.com/XTLS/Go / aeadChaCha20Poly1305

Function aeadChaCha20Poly1305

cipher_suites.go:540–552  ·  view source on GitHub ↗
(key, nonceMask []byte)

Source from the content-addressed store, hash-verified

538}
539
540func aeadChaCha20Poly1305(key, nonceMask []byte) aead {
541 if len(nonceMask) != aeadNonceLength {
542 panic("tls: internal error: wrong nonce length")
543 }
544 aead, err := chacha20poly1305.New(key)
545 if err != nil {
546 panic(err)
547 }
548
549 ret := &xorNonceAEAD{aead: aead}
550 copy(ret.nonceMask[:], nonceMask)
551 return ret
552}
553
554type constantTimeHash interface {
555 hash.Hash

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…