From fff35966d988e934f22b889f92a17f9cd5ff3044 Mon Sep 17 00:00:00 2001 From: "Pedro F. Albanese" <68971450+pedroalbanese@users.noreply.github.com> Date: Thu, 3 Feb 2022 16:46:00 -0300 Subject: [PATCH 1/7] Update go.mod --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 501850b..a1caa12 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/frankurcrazy/snow3g +module github.com/pedroalbanese/snow3g go 1.13 From 8ede2b28deadd4085bc233eadfda4d657f3f4f68 Mon Sep 17 00:00:00 2001 From: "Pedro F. Albanese" <68971450+pedroalbanese@users.noreply.github.com> Date: Thu, 3 Feb 2022 16:51:55 -0300 Subject: [PATCH 2/7] Update uea2.go --- uea2/uea2.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uea2/uea2.go b/uea2/uea2.go index 7f35ee8..fdad2f1 100644 --- a/uea2/uea2.go +++ b/uea2/uea2.go @@ -5,7 +5,7 @@ package uea2 import ( - "github.com/frankurcrazy/snow3g" + "github.com/pedroalbanese/snow3g" ) type UEA2 struct { From a0e0ecbecc322efd2b745685bc2a8e9a357873df Mon Sep 17 00:00:00 2001 From: "Pedro F. Albanese" <68971450+pedroalbanese@users.noreply.github.com> Date: Thu, 3 Feb 2022 17:47:53 -0300 Subject: [PATCH 3/7] Update uia2.go --- uia2/uia2.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uia2/uia2.go b/uia2/uia2.go index 90b9477..0994d13 100644 --- a/uia2/uia2.go +++ b/uia2/uia2.go @@ -5,7 +5,7 @@ package uia2 import ( - "github.com/frankurcrazy/snow3g" + "github.com/pedroalbanese/snow3g" ) type UIA2 struct { From 619d3e3eabacf9aec4c4af5301b22891abd96447 Mon Sep 17 00:00:00 2001 From: "Pedro F. Albanese" <68971450+pedroalbanese@users.noreply.github.com> Date: Thu, 3 Feb 2022 19:35:24 -0300 Subject: [PATCH 4/7] Update uia2.go --- uia2/uia2.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/uia2/uia2.go b/uia2/uia2.go index 0994d13..050f9ba 100644 --- a/uia2/uia2.go +++ b/uia2/uia2.go @@ -95,3 +95,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 +} From fd753ef2d96b84b7c245a9520f5e0c3b5c3387b7 Mon Sep 17 00:00:00 2001 From: "Pedro F. Albanese" <68971450+pedroalbanese@users.noreply.github.com> Date: Thu, 3 Feb 2022 19:38:19 -0300 Subject: [PATCH 5/7] Update uia2.go --- uia2/uia2.go | 1 + 1 file changed, 1 insertion(+) diff --git a/uia2/uia2.go b/uia2/uia2.go index 050f9ba..e98c683 100644 --- a/uia2/uia2.go +++ b/uia2/uia2.go @@ -5,6 +5,7 @@ package uia2 import ( + "bytes" "github.com/pedroalbanese/snow3g" ) From 0b7b51bb92fb63ed296e644884bce3a65e44fade Mon Sep 17 00:00:00 2001 From: "Pedro F. Albanese" <68971450+pedroalbanese@users.noreply.github.com> Date: Fri, 4 Feb 2022 16:00:08 -0300 Subject: [PATCH 6/7] Update uea2_test.go --- uea2/uea2_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uea2/uea2_test.go b/uea2/uea2_test.go index db0b91e..cdcd597 100644 --- a/uea2/uea2_test.go +++ b/uea2/uea2_test.go @@ -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" From 00dd57608cceeb99041cd0f4d10d358063720b9d Mon Sep 17 00:00:00 2001 From: "Pedro F. Albanese" <68971450+pedroalbanese@users.noreply.github.com> Date: Fri, 4 Feb 2022 16:00:29 -0300 Subject: [PATCH 7/7] Update uia2_test.go --- uia2/uia2_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uia2/uia2_test.go b/uia2/uia2_test.go index e0ca962..90c6d94 100644 --- a/uia2/uia2_test.go +++ b/uia2/uia2_test.go @@ -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"