encryption

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: May 4, 2024 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cipher

type Cipher string

Cipher is the cipher type and can be AES-256-GCM.

type Curve

type Curve string

Curve is the curve type and can be P256.

type Encryption

type Encryption interface {
	// Encrypt encrypts the data
	Encrypt(header messages.MessageHeader, data []byte) ([]byte, error)

	// Decrypt decrypts the data
	Decrypt(header messages.MessageHeader, data []byte) ([]byte, error)
}

func NewEncryption

func NewEncryption(localPublicKey string, localPrivateKey string, peerPublicKey string, cipher Cipher, curve Curve) Encryption

NewEncryption creates a new encryption.

Jump to

Keyboard shortcuts

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