Documentation ¶
Index ¶
- type NameCrypter
- func (nc *NameCrypter) DecryptLink(cpath string) (string, error)
- func (nc *NameCrypter) DecryptName(name string) (string, error)
- func (nc *NameCrypter) DecryptPath(path string) (string, error)
- func (nc *NameCrypter) EncryptLink(path string) string
- func (nc *NameCrypter) EncryptName(path string, name string) string
- func (nc *NameCrypter) EncryptPath(path string) string
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 (*NameCrypter) DecryptLink ¶
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 (*NameCrypter) EncryptLink ¶
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
Click to show internal directories.
Click to hide internal directories.