secret

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CipherText

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

func NewCipherText

func NewCipherText(cipherText []byte) (CipherText, error)

func (CipherText) Bytes

func (t CipherText) Bytes() []byte

func (CipherText) String

func (t CipherText) String() string

type CryptoService

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

func NewCryptoService

func NewCryptoService(password string, iterations int, keyBytes int, saltBytes int) *CryptoService

func (*CryptoService) Decrypt

func (s *CryptoService) Decrypt(cipherText CipherText) ([]byte, error)

func (*CryptoService) Encrypt

func (s *CryptoService) Encrypt(plaintext []byte) (CipherText, error)

type FileService

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

func NewFileService

func NewFileService(cryptoService *CryptoService, extension string, removeFiles bool) *FileService

func (*FileService) DecryptFile

func (s *FileService) DecryptFile(filename string) error

func (*FileService) EncryptFile

func (s *FileService) EncryptFile(filename string) error

type PipeService

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

func NewPipeService

func NewPipeService(cryptoService *CryptoService, r io.Reader, w io.Writer) *PipeService

func (*PipeService) Decrypt

func (s *PipeService) Decrypt() error

func (*PipeService) Encrypt

func (s *PipeService) Encrypt() error

Jump to

Keyboard shortcuts

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