aboutsummaryrefslogtreecommitdiff
path: root/internal/nametransform/names.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2019-01-02 21:45:40 +0100
committerJakob Unterwurzacher2019-01-02 21:45:40 +0100
commit2b12bba274ba75f76ac8c2af3790e4190b32396f (patch)
treeba8a637f0677cbe387220de9f4742dd0e33c639c /internal/nametransform/names.go
parent59f1300591d44b1e5d8187b54951c03d6120289f (diff)
fusefronted: make EncryptPath symlink-safe
Finally allows us to delete EncryptPathDirIV.
Diffstat (limited to 'internal/nametransform/names.go')
-rw-r--r--internal/nametransform/names.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/internal/nametransform/names.go b/internal/nametransform/names.go
index 22e639a..33128b9 100644
--- a/internal/nametransform/names.go
+++ b/internal/nametransform/names.go
@@ -74,11 +74,10 @@ func (n *NameTransform) DecryptName(cipherName string, iv []byte) (string, error
}
// EncryptName encrypts "plainName", returns a base64-encoded "cipherName64".
-// Used internally by EncryptPathDirIV().
// The encryption is either CBC or EME, depending on "useEME".
//
-// This function is exported because fusefrontend needs access to the full (not hashed)
-// name if longname is used. Otherwise you should use EncryptPathDirIV()
+// This function is exported because in some cases, fusefrontend needs access
+// to the full (not hashed) name if longname is used.
func (n *NameTransform) EncryptName(plainName string, iv []byte) (cipherName64 string) {
bin := []byte(plainName)
bin = pad16(bin)