(key, nonceMask []byte)
| 520 | } |
| 521 | |
| 522 | func 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 | |
| 540 | func aeadChaCha20Poly1305(key, nonceMask []byte) aead { |
| 541 | if len(nonceMask) != aeadNonceLength { |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…