encryption

package
v1.0.12 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidPacket = errors.New("encryption: invalid packet")
)

Functions

This section is empty.

Types

type Encryption

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

func NewEncryption

func NewEncryption() *Encryption

func (*Encryption) Decrypt

func (encryption *Encryption) Decrypt(data []byte) ([]byte, error)

func (*Encryption) Encrypt

func (encryption *Encryption) Encrypt(data []byte) ([]byte, error)

func (*Encryption) GetKey added in v0.0.38

func (encryption *Encryption) GetKey() []byte

func (*Encryption) PrepareToken

func (encryption *Encryption) PrepareToken() ([]byte, error)

func (*Encryption) SetAccessKey added in v0.0.38

func (encryption *Encryption) SetAccessKey(key string)

func (*Encryption) SetKey

func (encryption *Encryption) SetKey(key []byte)

func (*Encryption) ValidateToken

func (encryption *Encryption) ValidateToken(token []byte) bool

Jump to

Keyboard shortcuts

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