(key, noncePrefix []byte)
| 506 | } |
| 507 | |
| 508 | func 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. |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…