ncutils

package
v0.24.1 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// ACK - acknowledgement signal for MQ
	ACK = 1
	// DONE - done signal for MQ
	DONE = 2
)
View Source
const CheckInInterval = 1

CheckInInterval - the interval for check-in time in units/minute

View Source
const DEFAULT_GC_PERCENT = 10

DEFAULT_GC_PERCENT - garbage collection percent

Variables

This section is empty.

Functions

func BoxDecrypt

func BoxDecrypt(encrypted []byte, senderPublicKey *[32]byte, recipientPrivateKey *[32]byte) ([]byte, error)

BoxDecrypt - decrypts traffic box

func BoxEncrypt

func BoxEncrypt(message []byte, recipientPubKey *[32]byte, senderPrivateKey *[32]byte) ([]byte, error)

BoxEncrypt - encrypts traffic box

func Chunk

func Chunk(message []byte, recipientPubKey *[32]byte, senderPrivateKey *[32]byte) ([]byte, error)

Chunk - chunks a message and encrypts each chunk

func ConvertBytesToKey

func ConvertBytesToKey(data []byte) (*[32]byte, error)

ConvertBytesToKey - util to convert bytes to a key to use elsewhere

func ConvertKeyToBytes

func ConvertKeyToBytes(key *[32]byte) ([]byte, error)

ConvertKeyToBytes - util to convert a key to bytes to use elsewhere

func DeChunk

func DeChunk(chunkedMsg []byte, senderPublicKey *[32]byte, recipientPrivateKey *[32]byte) ([]byte, error)

DeChunk - "de" chunks and decrypts a message

func IpIsPrivate

func IpIsPrivate(ipnet net.IP) bool

func StringSliceContains

func StringSliceContains(slice []string, item string) bool

StringSliceContains - sees if a string slice contains a string element

Types

This section is empty.

Jump to

Keyboard shortcuts

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