payloadcrypt

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2016 License: BSD-3-Clause Imports: 8 Imported by: 0

README

payloadcrypt Circle CI GoDoc

Package payloadcrypt provides payload encryption and decryption utilities, primarily for UDP packets.

License

BSD (see LICENSE)

Documentation

Overview

Package payloadcrypt provides payload encryption and decryption utilities, primarily for UDP packets.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Crypt

type Crypt struct {
	// contains filtered or unexported fields
}

Crypt represents a payload encrypter and decrypter based on shared encryption and authentication keys.

func NewCrypt

func NewCrypt(encryptionKey, hmacKey []byte) (*Crypt, error)

NewCrypt returns a new *Crypt with the given keys.

func (*Crypt) Decrypt

func (c *Crypt) Decrypt(payload []byte) ([]byte, error)

Decrypt decrypts the given payload.

func (*Crypt) Encrypt

func (c *Crypt) Encrypt(payload []byte) ([]byte, error)

Encrypt encrypts the given payload.

Jump to

Keyboard shortcuts

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