blob: ba6ad09346a37889e1f87f6647e6537914c37cc0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
package frontend
import (
"github.com/rfjakob/gocryptfs/cryptfs"
"github.com/rfjakob/cluefs/lib/cluefs"
)
type FS struct {
*cryptfs.CryptFS
*cluefs.ClueFS
}
type nullTracer struct {}
func (nullTracer) Trace(op cluefs.FsOperTracer) {}
func NewFS(key [16]byte, backing string) *FS {
var nt nullTracer
clfs, err := cluefs.NewClueFS(backing, nt)
if err != nil {
panic(err)
}
return &FS {
CryptFS: cryptfs.NewCryptFS(key),
ClueFS: clfs,
}
}
|