Implemented MAC1/2 calculation
This commit is contained in:
@@ -18,6 +18,17 @@ func assertEqual(t *testing.T, a []byte, b []byte) {
|
||||
}
|
||||
}
|
||||
|
||||
func newDevice(t *testing.T) *Device {
|
||||
var device Device
|
||||
sk, err := newPrivateKey()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
device.Init()
|
||||
device.SetPrivateKey(sk)
|
||||
return &device
|
||||
}
|
||||
|
||||
func TestCurveWrappers(t *testing.T) {
|
||||
sk1, err := newPrivateKey()
|
||||
assertNil(t, err)
|
||||
@@ -36,17 +47,6 @@ func TestCurveWrappers(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func newDevice(t *testing.T) *Device {
|
||||
var device Device
|
||||
sk, err := newPrivateKey()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
device.Init()
|
||||
device.SetPrivateKey(sk)
|
||||
return &device
|
||||
}
|
||||
|
||||
func TestNoiseHandshake(t *testing.T) {
|
||||
|
||||
dev1 := newDevice(t)
|
||||
|
||||
Reference in New Issue
Block a user