security

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NoiseKeySize = 32
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Codec

type Codec interface {
	Encode(content []byte) ([]byte, error)
	Decode(cipherBuff []byte) ([]byte, error)
}

func New

func New(privateKey NoisePrivateKey, pubKey NoisePublicKey) Codec

type NoisePrivateKey

type NoisePrivateKey [NoiseKeySize]byte

func NewPrivateKey

func NewPrivateKey() (npk NoisePrivateKey, err error)

func (NoisePrivateKey) NewPubicKey

func (npk NoisePrivateKey) NewPubicKey() (npc NoisePublicKey)

func (NoisePrivateKey) NewSharedKey

func (npk NoisePrivateKey) NewSharedKey(npc NoisePublicKey) (shareKey NoiseSharedKey)

type NoisePublicKey

type NoisePublicKey [NoiseKeySize]byte

type NoiseSharedKey

type NoiseSharedKey [NoiseKeySize]byte

Jump to

Keyboard shortcuts

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