aboutsummaryrefslogtreecommitdiff
path: root/pkg/a2s/a2s_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/a2s/a2s_test.go')
-rw-r--r--pkg/a2s/a2s_test.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/pkg/a2s/a2s_test.go b/pkg/a2s/a2s_test.go
index 72eba3a..b97b5c4 100644
--- a/pkg/a2s/a2s_test.go
+++ b/pkg/a2s/a2s_test.go
@@ -51,6 +51,15 @@ func TestDecodeChallenge(t *testing.T) {
t.Errorf("incorrect challenge")
}
}
+
+func TestAtlasSigreq1(t *testing.T) {
+ b := mustDecodeHex("ffffffff547369677265713100803dab964c7c71851c05de40f5bf4cf72743951c96f2f0b81139ca780203260674657374")
+ a := r2encodeAtlasSigreq1([]byte("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), []byte("test"))
+ if !bytes.Equal(a, b) {
+ t.Errorf("incorrect encoding: expected %x, got %x", b, a)
+ }
+}
+
func FuzzGetChallenge(f *testing.F) {
f.Add(uint64(0))
f.Add(uint64(1000000001337))