replace the SetDiversificationNonce crypto setup method by a chan

This commit is contained in:
Marten Seemann
2018-03-22 23:17:26 +00:00
parent 2fbc994d29
commit c6526ad927
8 changed files with 31 additions and 38 deletions

View File

@@ -40,8 +40,7 @@ type CryptoSetup interface {
Open(dst, src []byte, packetNumber protocol.PacketNumber, associatedData []byte) ([]byte, protocol.EncryptionLevel, error)
HandleCryptoStream() error
// TODO: clean up this interface
DiversificationNonce() []byte // only needed for cryptoSetupServer
SetDiversificationNonce([]byte) // only needed for cryptoSetupClient
DiversificationNonce() []byte // only needed for cryptoSetupServer
ConnectionState() ConnectionState
GetSealer() (protocol.EncryptionLevel, Sealer)