mirror of
https://github.com/SagerNet/sing-shadowsocks.git
synced 2025-04-04 12:27:39 +03:00
Fix crypto/cipher.xorWords removed
This commit is contained in:
parent
2c20845ada
commit
e3123545f2
2 changed files with 13 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
||||||
|
//go:build go1.20
|
||||||
|
|
||||||
package shadowaead_2022
|
package shadowaead_2022
|
||||||
|
|
||||||
import _ "unsafe"
|
import "crypto/subtle"
|
||||||
|
|
||||||
//go:linkname xorWords crypto/cipher.xorWords
|
var xorWords = subtle.XORBytes
|
||||||
//go:noescape
|
|
||||||
func xorWords(dst, a, b []byte)
|
|
||||||
|
|
9
shadowaead_2022/xor_go119.go
Normal file
9
shadowaead_2022/xor_go119.go
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
//go:build !go1.20
|
||||||
|
|
||||||
|
package shadowaead_2022
|
||||||
|
|
||||||
|
import _ "unsafe"
|
||||||
|
|
||||||
|
//go:linkname xorWords crypto/cipher.xorWords
|
||||||
|
//go:noescape
|
||||||
|
func xorWords(dst, a, b []byte)
|
Loading…
Add table
Add a link
Reference in a new issue