Skip to content

Commit e62d789

Browse files
committed
Deprecate XorBytes
Now that we no longer support Go 1.19, we might as well deprecate XorBytes and use the stdlib version instead.
1 parent e8ac9ae commit e62d789

File tree

5 files changed

+3
-256
lines changed

5 files changed

+3
-256
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ require (
77
github.com/stretchr/testify v1.9.0
88
github.com/wlynxg/anet v0.0.4
99
golang.org/x/net v0.28.0
10-
golang.org/x/sys v0.24.0
1110
)
1211

1312
require (
1413
github.com/davecgh/go-spew v1.1.1 // indirect
1514
github.com/pmezard/go-difflib v1.0.0 // indirect
15+
golang.org/x/sys v0.24.0 // indirect
1616
gopkg.in/yaml.v3 v3.0.1 // indirect
1717
)

utils/xor/xor_generic.go renamed to utils/xor/xor.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
// SPDX-FileCopyrightText: 2024 The Pion community <https://pion.ly>
44
// SPDX-License-Identifier: MIT
55

6-
//go:build go1.20 && !arm && !gccgo
7-
86
// Package xor provides the XorBytes function.
97
package xor
108

@@ -14,6 +12,8 @@ import (
1412

1513
// XorBytes calls [crypto/suble.XORBytes].
1614
//
15+
// Deprecated: please call [crypto/subtle.XORBytes] instead.
16+
//
1717
//revive:disable-next-line
1818
func XorBytes(dst, a, b []byte) int {
1919
return subtle.XORBytes(dst, a, b)

utils/xor/xor_arm.go

Lines changed: 0 additions & 60 deletions
This file was deleted.

utils/xor/xor_arm.s

Lines changed: 0 additions & 116 deletions
This file was deleted.

utils/xor/xor_old.go

Lines changed: 0 additions & 77 deletions
This file was deleted.

0 commit comments

Comments
 (0)