1
0
mirror of https://github.com/fumiama/WireGold.git synced 2026-06-09 10:26:02 +08:00

update deps

This commit is contained in:
源文雨
2022-04-15 16:19:19 +08:00
parent 723204917c
commit d0bbddc3ba
5 changed files with 22 additions and 17 deletions

View File

@@ -28,7 +28,7 @@ func NewWireGold(c *config.Config) (wg WG, err error) {
wg.c = c
var k []byte
k, err = base14.UTF82utf16be(helper.StringToBytes(c.PrivateKey + suffix32))
k, err = base14.UTF82UTF16BE(helper.StringToBytes(c.PrivateKey + suffix32))
if err != nil {
return
}
@@ -39,7 +39,7 @@ func NewWireGold(c *config.Config) (wg WG, err error) {
}
cur := curve.Get(wg.key[:])
pubk, err := base14.UTF16be2utf8(base14.Encode((*cur.Public())[:]))
pubk, err := base14.UTF16BE2UTF8(base14.Encode((*cur.Public())[:]))
if err != nil {
return
}
@@ -101,7 +101,7 @@ func (wg *WG) init(srcport, dstport, mtu uint16) {
for _, peer := range wg.c.Peers {
var peerkey [32]byte
k, err := base14.UTF82utf16be(helper.StringToBytes(peer.PublicKey + suffix32))
k, err := base14.UTF82UTF16BE(helper.StringToBytes(peer.PublicKey + suffix32))
if err != nil {
panic(err)
}