wrappers

package
v0.0.0-...-afdf500 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const HMAC_SIZE = 32

Variables

This section is empty.

Functions

func DecodePacket

func DecodePacket(data []byte, n int, hkey []byte, p *packet.Packet) error

DecodePacket takes a blob of data, validates it, and decodes it into a protobuf packet. hkey is used to create a keyed Blake2b hash packets are rejected if their message authentication code is invalid

func EncodePacket

func EncodePacket(p *packet.Packet, hkey []byte) ([]byte, error)

EncodePacket takes a protobuf packet and prepends a message authentication code to it hkey is used to create a keyed Blake2b hash

Types

type CryptoError

type CryptoError struct {
	Reason string
	Err    error
}

func (*CryptoError) Error

func (c *CryptoError) Error() string

Jump to

Keyboard shortcuts

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