refactor initialization of AEADs

This commit is contained in:
Marten Seemann
2019-06-11 10:35:52 +08:00
parent 0dd5a0b91f
commit d3ca8db521
5 changed files with 51 additions and 40 deletions

View File

@@ -1,6 +1,8 @@
package handshake
import (
"crypto"
"crypto/cipher"
"crypto/tls"
"net"
"time"
@@ -9,6 +11,13 @@ import (
"github.com/marten-seemann/qtls"
)
type cipherSuite interface {
Hash() crypto.Hash
KeyLen() int
IVLen() int
AEAD(key, nonce []byte) cipher.AEAD
}
type conn struct {
remoteAddr net.Addr
}