Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/frankurcrazy/snow3g
module github.com/pedroalbanese/snow3g

go 1.13

Expand Down
2 changes: 1 addition & 1 deletion uea2/uea2.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
package uea2

import (
"github.com/frankurcrazy/snow3g"
"github.com/pedroalbanese/snow3g"
)

type UEA2 struct {
Expand Down
2 changes: 1 addition & 1 deletion uea2/uea2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package uea2
import (
"encoding/binary"
"encoding/hex"
"github.com/frankurcrazy/snow3g"
"github.com/pedroalbanese/snow3g"
"github.com/stretchr/testify/assert"
"strings"
"testing"
Expand Down
9 changes: 8 additions & 1 deletion uia2/uia2.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
package uia2

import (
"github.com/frankurcrazy/snow3g"
"bytes"
"github.com/pedroalbanese/snow3g"
)

type UIA2 struct {
Expand Down Expand Up @@ -95,3 +96,9 @@ func (u *UIA2) F9(data []byte, blength uint64) []byte {
func (u *UIA2) Hash(data []byte, blength uint64) []byte {
return u.F9(data, blength)
}

func (e *UIA2) Verify(m []byte, blen uint64, mac []byte) bool {
chksum := e.Hash(m, blen)

return bytes.Compare(chksum, mac) == 0
}
2 changes: 1 addition & 1 deletion uia2/uia2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package uia2
import (
"encoding/binary"
"encoding/hex"
"github.com/frankurcrazy/snow3g"
"github.com/pedroalbanese/snow3g"
"github.com/stretchr/testify/assert"
"strings"
"testing"
Expand Down