return the encryption level used for Sealing

This commit is contained in:
Marten Seemann 2017-02-24 13:59:27 +07:00
parent a97faf0bea
commit 0c20f5e9b3
No known key found for this signature in database
GPG key ID: 3603F40B121FCDEA
8 changed files with 33 additions and 23 deletions

View file

@ -19,8 +19,8 @@ func (m *mockCryptoSetup) HandleCryptoStream() error { return nil }
func (m *mockCryptoSetup) Open(dst, src []byte, packetNumber protocol.PacketNumber, associatedData []byte) ([]byte, protocol.EncryptionLevel, error) {
return nil, protocol.EncryptionUnspecified, nil
}
func (m *mockCryptoSetup) Seal(dst, src []byte, packetNumber protocol.PacketNumber, associatedData []byte) []byte {
return append(src, bytes.Repeat([]byte{0}, 12)...)
func (m *mockCryptoSetup) Seal(dst, src []byte, packetNumber protocol.PacketNumber, associatedData []byte) ([]byte, protocol.EncryptionLevel) {
return append(src, bytes.Repeat([]byte{0}, 12)...), protocol.EncryptionUnspecified
}
func (m *mockCryptoSetup) LockForSealing() {}
func (m *mockCryptoSetup) UnlockForSealing() {}