crypto

package
v0.0.0-...-084929d Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const CHACHA20 = "chacha20"
View Source
const NONE = "none"

Variables

View Source
var AES = "AES"

Functions

func AddCrypto

func AddCrypto(name string, new NewCryptoFunc) error

func GetCryptos

func GetCryptos() []string

Types

type Aes

type Aes struct {
	cryptocommon.CryptoOption
	// contains filtered or unexported fields
}

func (*Aes) Decrypt

func (a *Aes) Decrypt(in []byte) []byte

func (*Aes) DecryptReader

func (a *Aes) DecryptReader(r io.Reader) io.Reader

func (*Aes) Encrypt

func (a *Aes) Encrypt(in []byte) []byte

func (*Aes) EncryptReader

func (a *Aes) EncryptReader(r io.Reader) io.Reader

type Chacha20

type Chacha20 struct {
	cryptocommon.CryptoOption
	// contains filtered or unexported fields
}

func (*Chacha20) Decrypt

func (c *Chacha20) Decrypt(in []byte) []byte

func (*Chacha20) DecryptReader

func (c *Chacha20) DecryptReader(r io.Reader) io.Reader

func (*Chacha20) Encrypt

func (c *Chacha20) Encrypt(in []byte) []byte

func (*Chacha20) EncryptReader

func (c *Chacha20) EncryptReader(r io.Reader) io.Reader

type None

type None struct{}

func (*None) Decrypt

func (c *None) Decrypt(in []byte) []byte

func (*None) DecryptReader

func (c *None) DecryptReader(r io.Reader) io.Reader

func (*None) Encrypt

func (c *None) Encrypt(in []byte) []byte

func (*None) EncryptReader

func (c *None) EncryptReader(r io.Reader) io.Reader

Jump to

Keyboard shortcuts

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