crypto

package
v0.0.0-...-8293206 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AESEncryptor

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

func (*AESEncryptor) Decrypt

func (ae *AESEncryptor) Decrypt(cipherText []byte) ([]byte, error)

func (*AESEncryptor) Encrypt

func (ae *AESEncryptor) Encrypt(plainText []byte) ([]byte, error)

func (*AESEncryptor) Key

func (ae *AESEncryptor) Key(key []byte) Encryptor

type Encryptor

type Encryptor interface {
	Key(key []byte) Encryptor
	Encrypt(plainText []byte) ([]byte, error)
	Decrypt(cipherText []byte) ([]byte, error)
}

type PlainEncryptor

type PlainEncryptor struct{}

func (*PlainEncryptor) Decrypt

func (pe *PlainEncryptor) Decrypt(cipherText []byte) ([]byte, error)

func (*PlainEncryptor) Encrypt

func (pe *PlainEncryptor) Encrypt(plainText []byte) ([]byte, error)

func (*PlainEncryptor) Key

func (pe *PlainEncryptor) Key(key []byte) Encryptor

Jump to

Keyboard shortcuts

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