part

package
v0.5.30 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2021 License: MIT Imports: 14 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(source, priKey []byte) ([]byte, error)

func Encrypt

func Encrypt(source, pubKey []byte) ([]byte, error)

func FileLoad

func FileLoad(path string) (data []byte, err error)

Types

type Crypto

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

func (*Crypto) GetDecrypt

func (t *Crypto) GetDecrypt(sourceByte []byte) (tragetByte []byte, err error)

func (*Crypto) GetEncrypt

func (t *Crypto) GetEncrypt(sourceByte []byte) (tragetByte []byte, err error)

func (*Crypto) GetPKCS1PriKey

func (t *Crypto) GetPKCS1PriKey(priPEMData []byte) (err error)

func (*Crypto) GetPKIXPubKey

func (t *Crypto) GetPKIXPubKey(pubPEMData []byte) (err error)

func (*Crypto) LoadPKCS1PriKey

func (t *Crypto) LoadPKCS1PriKey(path string) (err error)

func (*Crypto) LoadPKIXPubKey

func (t *Crypto) LoadPKIXPubKey(path string) (err error)

func (*Crypto) PriLoad

func (t *Crypto) PriLoad() bool

func (*Crypto) PubLoad

func (t *Crypto) PubLoad() bool

type Gcm

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

func (*Gcm) Decrypt

func (t *Gcm) Decrypt(source []byte) (r []byte, e error)

func (*Gcm) Encrypt

func (t *Gcm) Encrypt(source []byte) (r []byte, e error)

func (*Gcm) Init

func (t *Gcm) Init(key string) error

Jump to

Keyboard shortcuts

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