Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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
Click to show internal directories.
Click to hide internal directories.