1
0
mirror of https://github.com/Mrs4s/MiraiGo.git synced 2025-05-04 19:17:38 +08:00

internal/crypto: fix build with go1.20

This commit is contained in:
wdvxdr 2022-12-02 14:07:03 +08:00
parent 4deeac15f6
commit 4658474c60

View File

@ -12,7 +12,7 @@ func (e *ECDH) init(svrPubKey []byte) {
p256 := ecdh.P256() p256 := ecdh.P256()
local, _ := p256.GenerateKey(rand.Reader) local, _ := p256.GenerateKey(rand.Reader)
remote, _ := p256.NewPublicKey(svrPubKey) remote, _ := p256.NewPublicKey(svrPubKey)
share, _ := p256.ECDH(local, remote) share, _ := local.ECDH(remote)
hash := md5.New() hash := md5.New()
hash.Write(share[:16]) hash.Write(share[:16])