forked from quic-go/quic-go
change AEAD interface to use byte slices, simplifying its usage
This commit is contained in:
@@ -1,14 +1,9 @@
|
||||
package crypto
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"io"
|
||||
|
||||
"github.com/lucas-clemente/quic-go/protocol"
|
||||
)
|
||||
import "github.com/lucas-clemente/quic-go/protocol"
|
||||
|
||||
// An AEAD implements QUIC's authenticated encryption and associated data
|
||||
type AEAD interface {
|
||||
Open(packetNumber protocol.PacketNumber, associatedData []byte, ciphertext io.Reader) (*bytes.Reader, error)
|
||||
Seal(packetNumber protocol.PacketNumber, b *bytes.Buffer, associatedData []byte, plaintext []byte)
|
||||
Open(packetNumber protocol.PacketNumber, associatedData []byte, ciphertext []byte) ([]byte, error)
|
||||
Seal(packetNumber protocol.PacketNumber, associatedData []byte, plaintext []byte) []byte
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user