mirror of
https://git.zx2c4.com/wireguard-go
synced 2025-10-06 09:07:03 +08:00
Don't use modules
Feel free to revert this if you have a strong feeling about it. But so far as I can see, it adds a lot of complexity for basically no upsides.
This commit is contained in:
@@ -3,7 +3,6 @@ package main
|
||||
import (
|
||||
"crypto/hmac"
|
||||
"crypto/rand"
|
||||
"git.zx2c4.com/wireguard-go/internal/xchacha20poly1305"
|
||||
"golang.org/x/crypto/blake2s"
|
||||
"golang.org/x/crypto/chacha20poly1305"
|
||||
"sync"
|
||||
@@ -158,7 +157,7 @@ func (st *CookieChecker) CreateReply(
|
||||
return nil, err
|
||||
}
|
||||
|
||||
xchacha20poly1305.Encrypt(
|
||||
XChaCha20Poly1305Encrypt(
|
||||
reply.Cookie[:0],
|
||||
&reply.Nonce,
|
||||
cookie[:],
|
||||
@@ -202,7 +201,7 @@ func (st *CookieGenerator) ConsumeReply(msg *MessageCookieReply) bool {
|
||||
|
||||
var cookie [blake2s.Size128]byte
|
||||
|
||||
_, err := xchacha20poly1305.Decrypt(
|
||||
_, err := XChaCha20Poly1305Decrypt(
|
||||
cookie[:0],
|
||||
&msg.Nonce,
|
||||
msg.Cookie[:],
|
||||
|
Reference in New Issue
Block a user