aboutsummaryrefslogtreecommitdiff
path: root/internal/nametransform/diriv.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/nametransform/diriv.go')
-rw-r--r--internal/nametransform/diriv.go24
1 files changed, 0 insertions, 24 deletions
diff --git a/internal/nametransform/diriv.go b/internal/nametransform/diriv.go
index 66548f1..9c3c1d1 100644
--- a/internal/nametransform/diriv.go
+++ b/internal/nametransform/diriv.go
@@ -123,27 +123,3 @@ func (be *NameTransform) EncryptPathDirIV(plainPath string, rootDir string) (cip
be.DirIVCache.store(parentDir, iv, cParentDir)
return cipherPath, nil
}
-
-// DecryptPathDirIV - decrypt path using EME with DirIV
-//
-// TODO This has only a single user, Readlink(), and only for compatability with
-// gocryptfs v0.5. Drop?
-func (be *NameTransform) DecryptPathDirIV(encryptedPath string, rootDir string) (string, error) {
- var wd = rootDir
- var plainNames []string
- encryptedNames := strings.Split(encryptedPath, "/")
- tlog.Debug.Printf("DecryptPathDirIV: decrypting %v\n", encryptedNames)
- for _, encryptedName := range encryptedNames {
- iv, err := ReadDirIV(wd)
- if err != nil {
- return "", err
- }
- plainName, err := be.DecryptName(encryptedName, iv)
- if err != nil {
- return "", err
- }
- plainNames = append(plainNames, plainName)
- wd = filepath.Join(wd, encryptedName)
- }
- return filepath.Join(plainNames...), nil
-}