encryptor

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WorkwxEncryptor

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

func NewWorkwxEncryptor

func NewWorkwxEncryptor(
	encodingAESKey string,
	opts ...WorkwxEncryptorOption,
) (*WorkwxEncryptor, error)

func (*WorkwxEncryptor) Decrypt

func (e *WorkwxEncryptor) Decrypt(base64Msg []byte) (WorkwxPayload, error)

func (*WorkwxEncryptor) Encrypt

func (e *WorkwxEncryptor) Encrypt(payload *WorkwxPayload) (string, error)

type WorkwxEncryptorOption

type WorkwxEncryptorOption interface {
	// contains filtered or unexported methods
}

func WithEntropySource

func WithEntropySource(e io.Reader) WorkwxEncryptorOption

type WorkwxPayload

type WorkwxPayload struct {
	Msg       []byte
	ReceiveID []byte
}

Jump to

Keyboard shortcuts

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