encrypter

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CryptoAes

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

CryptoAes represents AES encryption struct

func NewCryptoAes

func NewCryptoAes(encryptionkey []byte, commoniv []byte) (*CryptoAes, error)

NewCryptoAes create CryptoAes struct

func (*CryptoAes) Decrypt

func (ca *CryptoAes) Decrypt(input []byte) []byte

Decrypt decrypts a input data

func (*CryptoAes) DecryptWithBase64

func (ca *CryptoAes) DecryptWithBase64(input string) (string, error)

DecryptWithBase64 decrypts a input data to base64 string

func (*CryptoAes) Encrypt

func (ca *CryptoAes) Encrypt(input []byte) []byte

Encrypt encrypts a input data

func (*CryptoAes) EncryptWithBase64

func (ca *CryptoAes) EncryptWithBase64(input string) string

EncryptWithBase64 encrypts a input data to base64 string

type CryptoEcdsa added in v0.1.1

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

CryptoEcdsa represents Ecdsa encryption struct

func NewCryptoEcdsa added in v0.1.1

func NewCryptoEcdsa(ecdsakey *entity.EcdsaKey) *CryptoEcdsa

NewCryptoEcdsa create CryptoEcdsa struct

func (*CryptoEcdsa) Decrypt added in v0.1.1

func (ce *CryptoEcdsa) Decrypt(input []byte) ([]byte, error)

Decrypt decrypts a input data

func (*CryptoEcdsa) DecryptWithBase64 added in v0.1.1

func (ce *CryptoEcdsa) DecryptWithBase64(input string) ([]byte, error)

DecryptWithBase64 decrypts a input data to base64 string

func (*CryptoEcdsa) Encrypt added in v0.1.1

func (ce *CryptoEcdsa) Encrypt(input []byte) ([]byte, error)

Encrypt encrypts a input data

func (*CryptoEcdsa) EncryptWithBase64 added in v0.1.1

func (ce *CryptoEcdsa) EncryptWithBase64(input []byte) (string, error)

EncryptWithBase64 encrypts a input data to base64 string

type CryptoEd25519 added in v0.2.0

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

CryptoEd25519 represents ED25519 encryption struct

func NewCryptoEd25519 added in v0.2.0

func NewCryptoEd25519(ed25519key *entity.Ed25519Key) *CryptoEd25519

NewCryptoEd25519 create CryptoEd25519 struct

func (*CryptoEd25519) Decrypt added in v0.2.0

func (ce *CryptoEd25519) Decrypt(input []byte) ([]byte, error)

Decrypt decrypts a input data

func (*CryptoEd25519) DecryptWithBase64 added in v0.2.0

func (ce *CryptoEd25519) DecryptWithBase64(input string) ([]byte, error)

DecryptWithBase64 decrypts a input data to base64 string

func (*CryptoEd25519) Encrypt added in v0.2.0

func (ce *CryptoEd25519) Encrypt(input []byte) ([]byte, error)

Encrypt encrypts a input data

func (*CryptoEd25519) EncryptWithBase64 added in v0.2.0

func (ce *CryptoEd25519) EncryptWithBase64(input []byte) (string, error)

EncryptWithBase64 encrypts a input data to base64 string

type CryptoRsa

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

CryptoRsa represents Rsa encryption struct

func NewCryptoRsa

func NewCryptoRsa(rsakey *entity.RsaKey) *CryptoRsa

NewCryptoRsa create CryptoRsa struct

func (*CryptoRsa) Decrypt

func (cr *CryptoRsa) Decrypt(input []byte) ([]byte, error)

Decrypt decrypts a input data

func (*CryptoRsa) DecryptWithBase64

func (cr *CryptoRsa) DecryptWithBase64(input string) ([]byte, error)

DecryptWithBase64 decrypts a input data to base64 string

func (*CryptoRsa) Encrypt

func (cr *CryptoRsa) Encrypt(input []byte) ([]byte, error)

Encrypt encrypts a input data

func (*CryptoRsa) EncryptWithBase64

func (cr *CryptoRsa) EncryptWithBase64(input []byte) (string, error)

EncryptWithBase64 encrypts a input data to base64 string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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