common

package
v0.0.0-...-9f3728c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 20, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(sharedSecretKey string, encryptedBytes []byte) []byte

Decrypt with AES using shared secret

func Encrypt

func Encrypt(sharedSecretKey string, messageBytes []byte) []byte

Encrypt with AES using shared secret

func GenerateKeys

func GenerateKeys() (string, string)

Generate ed25519 keypair

func LoadPrivateKey

func LoadPrivateKey(name string) ed25519.PrivateKey

func LoadPublicKey

func LoadPublicKey(name string) ed25519.PublicKey

func ParsePrivateKey

func ParsePrivateKey(privKey string) ed25519.PrivateKey

func ParsePublicKey

func ParsePublicKey(pubKey string) ed25519.PublicKey

func SignSignature

func SignSignature(privKey ed25519.PrivateKey, message string) string

func VerifySignature

func VerifySignature(pubKey ed25519.PublicKey, message, signature string) bool

Types

type Gorram

type Gorram struct {
	ClientCfgs sync.Map
	// contains filtered or unexported fields
}

func (*Gorram) Hello

func (g *Gorram) Hello(clientName string, resp *string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL