This commit is contained in:
tzagim
2024-05-21 20:08:12 +03:00
committed by GitHub
parent ff6d9f23e3
commit 0cf7c09ed5
85 changed files with 31569 additions and 479 deletions

View File

@@ -9,9 +9,8 @@ package keys
import (
"go.mau.fi/libsignal/ecc"
"go.mau.fi/util/random"
"golang.org/x/crypto/curve25519"
"go.mau.fi/whatsmeow/util/randbytes"
)
type KeyPair struct {
@@ -31,7 +30,7 @@ func NewKeyPairFromPrivateKey(priv [32]byte) *KeyPair {
}
func NewKeyPair() *KeyPair {
priv := *(*[32]byte)(randbytes.Make(32))
priv := *(*[32]byte)(random.Bytes(32))
priv[0] &= 248
priv[31] &= 127