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

Function aeadAESGCMTLS13

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

Source from the content-addressed store, hash-verified

520}
521
522func aeadAESGCMTLS13(key, nonceMask []byte) aead {
523 if len(nonceMask) != aeadNonceLength {
524 panic("tls: internal error: wrong nonce length")
525 }
526 aes, err := aes.NewCipher(key)
527 if err != nil {
528 panic(err)
529 }
530 aead, err := cipher.NewGCM(aes)
531 if err != nil {
532 panic(err)
533 }
534
535 ret := &xorNonceAEAD{aead: aead}
536 copy(ret.nonceMask[:], nonceMask)
537 return ret
538}
539
540func aeadChaCha20Poly1305(key, nonceMask []byte) aead {
541 if len(nonceMask) != aeadNonceLength {

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…