summaryrefslogtreecommitdiff
path: root/internal/fusefrontend_reverse/ctlsock_interface.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2017-05-28 18:09:02 +0200
committerJakob Unterwurzacher2017-05-30 17:04:46 +0200
commit857507e8b100626ae0471fae793efc52bf552821 (patch)
tree155ff21467d8b35887e9a7fd984d37e23f7e6e70 /internal/fusefrontend_reverse/ctlsock_interface.go
parent4d2cc551cf6fa71e425fad8f397e96d69f016a6b (diff)
fusefrontend_reverse: move pathiv to its own package
We will also need it in forward mode.
Diffstat (limited to 'internal/fusefrontend_reverse/ctlsock_interface.go')
-rw-r--r--internal/fusefrontend_reverse/ctlsock_interface.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/fusefrontend_reverse/ctlsock_interface.go b/internal/fusefrontend_reverse/ctlsock_interface.go
index 4d9a446..5f61f37 100644
--- a/internal/fusefrontend_reverse/ctlsock_interface.go
+++ b/internal/fusefrontend_reverse/ctlsock_interface.go
@@ -6,6 +6,7 @@ import (
"syscall"
"github.com/rfjakob/gocryptfs/internal/ctlsock"
+ "github.com/rfjakob/gocryptfs/internal/pathiv"
)
var _ ctlsock.Interface = &ReverseFS{} // Verify that interface is implemented.
@@ -20,7 +21,7 @@ func (rfs *ReverseFS) EncryptPath(plainPath string) (string, error) {
cipherPath := ""
parts := strings.Split(plainPath, "/")
for _, part := range parts {
- dirIV := derivePathIV(cipherPath, ivPurposeDirIV)
+ dirIV := pathiv.Derive(cipherPath, pathiv.PurposeDirIV)
encryptedPart := rfs.nameTransform.EncryptName(part, dirIV)
if rfs.args.LongNames && len(encryptedPart) > syscall.NAME_MAX {
encryptedPart = rfs.nameTransform.HashLongName(encryptedPart)