enc

package
v0.3.17 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Key

type Key struct {
	KeyEncrypt
	KeyDecrypt
}

func NewKey

func NewKey() *Key

type KeyDecrypt

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

func NewDecryptKey

func NewDecryptKey(encKey string) *KeyDecrypt

func (*KeyDecrypt) Decrypt

func (k *KeyDecrypt) Decrypt(ciphertext []byte) ([]byte, error)

func (*KeyDecrypt) DecryptionKey

func (k *KeyDecrypt) DecryptionKey() string

type KeyEncrypt

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

func NewEncryptKey

func NewEncryptKey(encKey string) *KeyEncrypt

func (*KeyEncrypt) Encrypt

func (k *KeyEncrypt) Encrypt(msg []byte) ([]byte, error)

func (*KeyEncrypt) EncryptString

func (k *KeyEncrypt) EncryptString(str string) ([]byte, error)

func (*KeyEncrypt) EncryptionKey

func (k *KeyEncrypt) EncryptionKey() string

Jump to

Keyboard shortcuts

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