crypto

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Crypto added in v0.8.0

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

func NewCrypto added in v0.8.0

func NewCrypto(method Method, key string) (*Crypto, error)

func (*Crypto) Decrypt added in v0.8.0

func (c *Crypto) Decrypt(in []byte) ([]byte, error)

func (*Crypto) Encrypt added in v0.8.0

func (c *Crypto) Encrypt(in []byte) ([]byte, error)

func (*Crypto) Method added in v0.8.0

func (c *Crypto) Method() Method

type Method

type Method uint8
const (
	None Method = iota
	Aes128Gcm
	Aes256Gcm
	ChaCha20Poly1305
)

func (Method) ToString

func (m Method) ToString() string

Jump to

Keyboard shortcuts

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