package keys

import "github.com/ZED-Magdy/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
v1.0.2 (latest)
Published
Dec 17, 2022
Platform
linux/amd64
Imports
4 packages
Last checked
10 hours ago

Tools for package owners.