Documentation ¶
Index ¶
- Constants
- func BoxDecrypt(encrypted []byte, senderPublicKey *[32]byte, recipientPrivateKey *[32]byte) ([]byte, error)
- func BoxEncrypt(message []byte, recipientPubKey *[32]byte, senderPrivateKey *[32]byte) ([]byte, error)
- func Chunk(message []byte, recipientPubKey *[32]byte, senderPrivateKey *[32]byte) ([]byte, error)
- func ConvertBytesToKey(data []byte) (*[32]byte, error)
- func ConvertKeyToBytes(key *[32]byte) ([]byte, error)
- func DeChunk(chunkedMsg []byte, senderPublicKey *[32]byte, recipientPrivateKey *[32]byte) ([]byte, error)
- func IpIsPrivate(ipnet net.IP) bool
- func StringSliceContains(slice []string, item string) bool
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 ConvertBytesToKey ¶
ConvertBytesToKey - util to convert bytes to a key to use elsewhere
func ConvertKeyToBytes ¶
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 StringSliceContains ¶
StringSliceContains - sees if a string slice contains a string element
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.