package keys

import "github.com/testovoleg/whatsmeow/util/keys"

Package keys contains a utility struct for elliptic curve keypairs.

Index

Types

type KeyPair

type KeyPair struct {
	Pub  *[32]byte
	Priv *[32]byte
}

func NewKeyPair

func NewKeyPair() *KeyPair

func NewKeyPairFromPrivateKey

func NewKeyPairFromPrivateKey(priv [32]byte) *KeyPair

func (*KeyPair) CreateSignedPreKey

func (kp *KeyPair) CreateSignedPreKey(keyID uint32) *PreKey

func (*KeyPair) Sign

func (kp *KeyPair) Sign(keyToSign *KeyPair) *[64]byte

type PreKey

type PreKey struct {
	KeyPair
	KeyID     uint32
	Signature *[64]byte
}

func NewPreKey

func NewPreKey(keyID uint32) *PreKey

Source Files

keypair.go

Version
v0.0.0-20230731113359-3e87cabb9327 (latest)
Published
Jul 31, 2023
Platform
linux/amd64
Imports
3 packages
Last checked
1 month ago

Tools for package owners.