MCPcopy Create free account
hub / github.com/XTLS/REALITY / aeadAESGCM

Function aeadAESGCM

cipher_suites.go:508–525  ·  view source on GitHub ↗
(key, noncePrefix []byte)

Source from the content-addressed store, hash-verified

506}
507
508func aeadAESGCM(key, noncePrefix []byte) aead {
509 if len(noncePrefix) != noncePrefixLength {
510 panic("tls: internal error: wrong nonce length")
511 }
512 aes, err := aes.NewCipher(key)
513 if err != nil {
514 panic(err)
515 }
516 //aead, err := gcm.NewGCMForTLS12(aes)
517 aead, err := cipher.NewGCM(aes)
518 if err != nil {
519 panic(err)
520 }
521
522 ret := &prefixNonceAEAD{aead: aead}
523 copy(ret.nonce[:], noncePrefix)
524 return ret
525}
526
527// aeadAESGCMTLS13 should be an internal detail,
528// but widely used packages access it using linkname.

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…