service

package
v0.0.0-...-f6794d1 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2023 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHTTPService

func NewHTTPService(cfg *config.Config, mLogger *logger.Logger) *httpService

NewHTTPService возваращает сервис с методам для обмена данными с сервером по HTTP протоколу

Types

type CryptoService

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

CryptoService структура сервиса симметричного шифрования

func NewCryptoService

func NewCryptoService(user *model.User) (cs *CryptoService, err error)

NewCryptoService возвращает сервис симметричного шифрования для пользователя приложения

func (*CryptoService) Decrypt

func (r *CryptoService) Decrypt(src []byte) ([]byte, error)

Decrypt расшифровывает масссив src

func (*CryptoService) DecryptFile

func (r *CryptoService) DecryptFile(src io.ReadCloser) (dst io.Reader, err error)

DecryptFile шифрует файл src

func (*CryptoService) Encrypt

func (r *CryptoService) Encrypt(src []byte) []byte

Encrypt шифрует масссив src

func (*CryptoService) EncryptFile

func (r *CryptoService) EncryptFile(src io.ReadCloser) (dst io.Reader, err error)

EncryptFile шифрует файл src

Jump to

Keyboard shortcuts

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