pkg

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAesGcm

func CreateAesGcm(key []byte) (cipher.AEAD, error)

func GetArgonIdKey

func GetArgonIdKey(password string, salt []byte, workers int) []byte

func GetCpuCores

func GetCpuCores() int

func GetVersionInfo

func GetVersionInfo() (*string, error)

func IsFileEncrypted

func IsFileEncrypted(content []byte, identifier string, saltSize int) bool

func LogTime

func LogTime(name string)

func LogTimeEnd

func LogTimeEnd(name string)

func PrintWarn added in v0.2.0

func PrintWarn(value string)

func ReadFileWithInfo

func ReadFileWithInfo(path string) ([]byte, fs.FileInfo, error)

func WriteFileOriginal

func WriteFileOriginal(path string, data []byte, info fs.FileInfo) error

Types

type CryptoClenc added in v0.2.0

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

func NewCryptoClenc added in v0.2.0

func NewCryptoClenc(password string, saltSize int, identifier string) *CryptoClenc

func (*CryptoClenc) Decrypt added in v0.2.0

func (c *CryptoClenc) Decrypt(data []byte) ([]byte, error)

Decrypt decrypts the given data using the configured decryption settings.

func (*CryptoClenc) DecryptFile added in v0.2.0

func (c *CryptoClenc) DecryptFile(path string) error

DecryptFile decrypts the file located at the specified path using the configured decryption settings.

func (*CryptoClenc) Encrypt added in v0.2.0

func (c *CryptoClenc) Encrypt(data []byte) ([]byte, error)

Encrypt encrypts the given data using the configured encryption settings.

func (*CryptoClenc) EncryptFile added in v0.2.0

func (c *CryptoClenc) EncryptFile(path string) error

EncryptFile encrypts the file located at the specified path using the configured encryption settings.

func (*CryptoClenc) IsFileEncrypted added in v0.2.0

func (c *CryptoClenc) IsFileEncrypted(content []byte, identifier string, saltSize int) bool

IsFileEncrypted checks if the given content is encrypted based on the provided identifier and salt size.

Jump to

Keyboard shortcuts

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