aboutsummaryrefslogtreecommitdiff
path: root/internal/nametransform
diff options
context:
space:
mode:
authorJakob Unterwurzacher2020-08-02 19:33:12 +0200
committerJakob Unterwurzacher2020-08-02 19:33:12 +0200
commit84ed139cd2cede9b773fe7892a0bc2515fc1f00f (patch)
tree9886e8fdce9450fd6232e532d5e8e939871dd2fc /internal/nametransform
parent4674bac8381838718f0defba0f2e0d9eba2a41a3 (diff)
v2api/reverse: implement Lookup for longname
Diffstat (limited to 'internal/nametransform')
-rw-r--r--internal/nametransform/names.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/nametransform/names.go b/internal/nametransform/names.go
index a659f0a..119d592 100644
--- a/internal/nametransform/names.go
+++ b/internal/nametransform/names.go
@@ -23,6 +23,10 @@ type NameTransformer interface {
DecryptName(cipherName string, iv []byte) (string, error)
EncryptName(plainName string, iv []byte) string
EncryptAndHashName(name string, iv []byte) (string, error)
+ // HashLongName - take the hash of a long string "name" and return
+ // "gocryptfs.longname.[sha256]"
+ //
+ // This function does not do any I/O.
HashLongName(name string) string
WriteLongNameAt(dirfd int, hashName string, plainName string) error
B64EncodeToString(src []byte) string