aboutsummaryrefslogtreecommitdiff
path: root/pathfs_frontend/names.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2015-11-27 00:03:10 +0100
committerJakob Unterwurzacher2015-11-27 00:03:10 +0100
commitdecfc1ab798055234e16a2e9c0782f56ae50669b (patch)
treebdff27eb861a17399b66e28883abfd2624b184c1 /pathfs_frontend/names.go
parentfe2fcf6c162a8370670fd1262b90925bf321f199 (diff)
diriv: Convert filename encryption users to diriv
Diffstat (limited to 'pathfs_frontend/names.go')
-rw-r--r--pathfs_frontend/names.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/pathfs_frontend/names.go b/pathfs_frontend/names.go
new file mode 100644
index 0000000..5842d83
--- /dev/null
+++ b/pathfs_frontend/names.go
@@ -0,0 +1,11 @@
+package pathfs_frontend
+
+// This file handles filename encryption
+
+func (fs *FS) encryptPath(plainPath string) (string, error) {
+ return fs.CryptFS.EncryptPathDirIV(plainPath, fs.backingDir)
+}
+
+func (fs *FS) decryptPath(cipherPath string) (string, error) {
+ return fs.CryptFS.DecryptPathDirIV(cipherPath, fs.backingDir)
+}