From 84ed139cd2cede9b773fe7892a0bc2515fc1f00f Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sun, 2 Aug 2020 19:33:12 +0200 Subject: v2api/reverse: implement Lookup for longname --- internal/nametransform/names.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'internal/nametransform') 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 -- cgit v1.2.3