namecrypter

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NameCrypter

type NameCrypter struct {
	*corecrypter.AesCrypter
	// contains filtered or unexported fields
}

NameCrypter used for encrypt and decrypt filenames

func NewNameCrypter

func NewNameCrypter(key []byte) *NameCrypter

NewNameCrypter create a new name crypter

func (nc *NameCrypter) DecryptLink(cpath string) (string, error)

DecryptLink decrypt the filepath for symbol link

func (*NameCrypter) DecryptName

func (nc *NameCrypter) DecryptName(name string) (string, error)

DecryptName decrypt the filename

func (*NameCrypter) DecryptPath

func (nc *NameCrypter) DecryptPath(path string) (string, error)

DecryptPath decrypt the filepath

func (nc *NameCrypter) EncryptLink(path string) string

EncryptLink encrypt the filepath for symbol link

use encryption like content crypt do avoid leak information of the plain filename

func (*NameCrypter) EncryptName

func (nc *NameCrypter) EncryptName(path string, name string) string

EncryptName encrypt the filename

path is the fullpath of the file relative to the filesystem,
used for determine the initial vector (IV)

func (*NameCrypter) EncryptPath

func (nc *NameCrypter) EncryptPath(path string) string

EncryptPath encrypt the filepath

Jump to

Keyboard shortcuts

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