(key, nonceMask []byte)
| 538 | } |
| 539 | |
| 540 | func 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 | |
| 554 | type constantTimeHash interface { |
| 555 | hash.Hash |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…