Implemented MAC1/2 calculation
This commit is contained in:
parent
eb75ff430d
commit
8236f3afa2
13 changed files with 454 additions and 85 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue