mirror of
https://github.com/Mrs4s/MiraiGo.git
synced 2025-05-04 11:07:40 +08:00
internal/crypto: fix build with go1.20
This commit is contained in:
parent
4deeac15f6
commit
4658474c60
@ -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])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user