Fixed KDF tests

This commit is contained in:
Mathias Hall-Andersen
2017-09-01 14:31:57 +02:00
parent 0294a5c0dd
commit c24b883c01
2 changed files with 10 additions and 7 deletions

View File

@@ -117,8 +117,8 @@ func TestNoiseHandshake(t *testing.T) {
var err error
var out []byte
var nonce [12]byte
out = key1.send.Seal(out, nonce[:], testMsg, nil)
out, err = key2.receive.Open(out[:0], nonce[:], out, nil)
out = key1.send.aead.Seal(out, nonce[:], testMsg, nil)
out, err = key2.receive.aead.Open(out[:0], nonce[:], out, nil)
assertNil(t, err)
assertEqual(t, out, testMsg)
}()
@@ -128,8 +128,8 @@ func TestNoiseHandshake(t *testing.T) {
var err error
var out []byte
var nonce [12]byte
out = key2.send.Seal(out, nonce[:], testMsg, nil)
out, err = key1.receive.Open(out[:0], nonce[:], out, nil)
out = key2.send.aead.Seal(out, nonce[:], testMsg, nil)
out, err = key1.receive.aead.Open(out[:0], nonce[:], out, nil)
assertNil(t, err)
assertEqual(t, out, testMsg)
}()