aboutsummaryrefslogtreecommitdiff
path: root/pathfs_frontend/names.go
blob: 9c6e0106cca203432f1030c58f4a80ad73243b61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package pathfs_frontend

// This file handles filename encryption

func (fs *FS) encryptPath(plainPath string) (string, error) {
	fs.dirIVLock.RLock()
	defer fs.dirIVLock.RUnlock()
	return fs.CryptFS.EncryptPathDirIV(plainPath, fs.backingDir)
}

func (fs *FS) decryptPath(cipherPath string) (string, error) {
	fs.dirIVLock.RLock()
	defer fs.dirIVLock.RUnlock()
	return fs.CryptFS.DecryptPathDirIV(cipherPath, fs.backingDir)
}